X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/d52c76021eaf1621b4e55a6eba1df1c0404bd7dd..8a8f5dd4b7f9971510d624d61455baf0bde4221c:/apps/catalogue/models.py diff --git a/apps/catalogue/models.py b/apps/catalogue/models.py index 78e6b0b3d..fbae111ea 100644 --- a/apps/catalogue/models.py +++ b/apps/catalogue/models.py @@ -33,6 +33,7 @@ from os import path import search +# Those are hard-coded here so that makemessages sees them. TAG_CATEGORIES = ( ('author', _('author')), ('epoch', _('epoch')), @@ -687,8 +688,8 @@ class Book(models.Model): result = create_zip.delay(paths, "%s_%s" % (self.slug, format_)) return result.wait() - def search_index(self, book_info=None): - if settings.CELERY_ALWAYS_EAGER: + def search_index(self, book_info=None, reuse_index=False): + if reuse_index: idx = search.ReusableIndex() else: idx = search.Index()