From: Radek Czajka Date: Fri, 10 Aug 2012 08:32:02 +0000 (+0200) Subject: remove offending save X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/08f83172c482208d35cd75c704cebd1d70a73af2?ds=inline;hp=f251e424924fe4f61ca6984a5b2dd5dd1fe51a61 remove offending save --- diff --git a/apps/catalogue/models/book.py b/apps/catalogue/models/book.py index 4b50fc9fc..cdafedff9 100644 --- a/apps/catalogue/models/book.py +++ b/apps/catalogue/models/book.py @@ -353,16 +353,16 @@ class Book(models.Model): # Save XML and HTML files book.xml_file.save('%s.xml' % book.slug, raw_file, save=False) + book.build_cover(book_info) # delete old fragments when overwriting book.fragments.all().delete() if book.build_html(): + # No direct saves behind this point. if not settings.NO_BUILD_TXT and build_txt: book.build_txt() - book.build_cover(book_info) - if not settings.NO_BUILD_EPUB and build_epub: book.build_epub() @@ -394,8 +394,6 @@ class Book(models.Model): for tag in descendants_tags: tasks.touch_tag(tag) - book.save() - # refresh cache book.reset_tag_counter() book.reset_theme_counter()