X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/02b46ac5bb9ae5301e4764b9c111c971aa86b333..8a8f5dd4b7f9971510d624d61455baf0bde4221c:/apps/catalogue/models.py?ds=sidebyside 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()