X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/d52c76021eaf1621b4e55a6eba1df1c0404bd7dd..124258c72bb9e69e6336de195f3a3b3e74509b95:/apps/catalogue/models.py diff --git a/apps/catalogue/models.py b/apps/catalogue/models.py index 78e6b0b3d..0c3513047 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')), @@ -688,7 +689,7 @@ class Book(models.Model): return result.wait() def search_index(self, book_info=None): - if settings.CELERY_ALWAYS_EAGER: + if hasattr(settings, 'CELERY_ALWAYS_EAGER') and settings.CELERY_ALWAYS_EAGER: idx = search.ReusableIndex() else: idx = search.Index()