Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
AE
Sith
Commits
57454bff
Commit
57454bff
authored
Dec 11, 2018
by
Sli
Committed by
Skia
Dec 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
forum: workaround size error while building index, handle malformed utf8
parent
641d564e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
core/search_indexes.py
core/search_indexes.py
+3
-1
No files found.
core/search_indexes.py
View file @
57454bff
...
@@ -99,7 +99,9 @@ class BigCharFieldIndex(indexes.CharField):
...
@@ -99,7 +99,9 @@ class BigCharFieldIndex(indexes.CharField):
"""
"""
def
prepare
(
self
,
term
):
def
prepare
(
self
,
term
):
return
super
(
BigCharFieldIndex
,
self
).
prepare
(
term
)[:
240
]
return
bytes
(
super
(
BigCharFieldIndex
,
self
).
prepare
(
term
),
"utf-8"
)[
:
245
].
decode
(
"utf-8"
,
errors
=
"ignore"
)
class
ForumMessageIndex
(
indexes
.
SearchIndex
,
indexes
.
Indexable
):
class
ForumMessageIndex
(
indexes
.
SearchIndex
,
indexes
.
Indexable
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment