diff options
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r-- | ishtar_common/models.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 201cf7c21..e33fb73e4 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -34,6 +34,7 @@ import shutil from subprocess import Popen, PIPE import tempfile import time +from unidecode import unidecode from django.conf import settings from django.contrib.postgres.fields import JSONField @@ -1093,7 +1094,11 @@ class FullSearch(models.Model): *self.BASE_SEARCH_VECTORS, config=settings.ISHTAR_SEARCH_LANGUAGE )).values('search') - search_vectors.append(q.all()[0]['search']) + search_vectors.append( + unidecode( + q.all()[0]['search'].decode('utf-8') + ) + ) self.search_vector = merge_tsvectors(search_vectors) changed = old_search != self.search_vector if save and changed: |