X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/032a2b1bdcecc42056de4a0171a55d173e4b765b..09f311cf21633def6e6eda0549633cd07b363cf2:/src/catalogue/models/book.py?ds=sidebyside diff --git a/src/catalogue/models/book.py b/src/catalogue/models/book.py index 12fdb8d3d..44ee02ecc 100644 --- a/src/catalogue/models/book.py +++ b/src/catalogue/models/book.py @@ -391,6 +391,11 @@ class Book(models.Model): meta_tags = Tag.tags_from_info(book_info) + for tag in meta_tags: + if not tag.for_books: + tag.for_books = True + tag.save() + book.tags = set(meta_tags + book_shelves) cover_changed = old_cover != book.cover_info()