X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/2f63ddbb8cb9d393f99a03ee057291d23c6655de..e1e0bdc6aed0ca388dd1c8da7a0721beb0f1a2e4:/src/catalogue/models/book.py diff --git a/src/catalogue/models/book.py b/src/catalogue/models/book.py index 7ed0b4cda..e9050d0c4 100644 --- a/src/catalogue/models/book.py +++ b/src/catalogue/models/book.py @@ -806,7 +806,8 @@ class Book(models.Model): for format_ in constants.EBOOK_FORMATS_WITH_CHILDREN: if format_ not in dont_build: getattr(book, '%s_file' % format_).build_delay() - book.html_nonotes_file.build_delay() + if 'html_nonotes' not in dont_build: + book.html_nonotes_file.build_delay() if not settings.NO_SEARCH_INDEX and search_index and findable: tasks.index_book.delay(book.id) @@ -815,7 +816,8 @@ class Book(models.Model): child.parent_cover_changed() book.update_popularity() - tasks.update_references.delay(book.id) + if 'references' not in dont_build: + tasks.update_references.delay(book.id) cls.published.send(sender=cls, instance=book) return book