X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/d9c51b94bfe6b1cda1790d57a9108b83c6e1643b..ca8f4e8fef80cb603117ed579da8554f503698e5:/src/catalogue/models/book.py?ds=inline diff --git a/src/catalogue/models/book.py b/src/catalogue/models/book.py index 86010df1a..29e375464 100644 --- a/src/catalogue/models/book.py +++ b/src/catalogue/models/book.py @@ -414,7 +414,7 @@ class Book(models.Model): has_daisy_file.boolean = True def has_sync_file(self): - return self.has_media("sync") + return settings.FEATURE_SYNCHRO and self.has_media("sync") def get_sync(self): with self.get_media('sync').first().file.open('r') as f: @@ -653,11 +653,6 @@ class Book(models.Model): meta_tags = Tag.tags_from_info(book_info) - for tag, relationship in meta_tags: - if not tag.for_books: - tag.for_books = True - tag.save() - just_tags = [t for (t, rel) in meta_tags if not rel] book.tags = set(just_tags + book_shelves) book.save() # update sort_key_author