X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/60b06883b6d5a336ef47c01103ec1ce25aafae69..24e09bc235b3ff6e659e901dfbdbcc23e6e14ba7:/apps/dictionary/models.py?ds=sidebyside diff --git a/apps/dictionary/models.py b/apps/dictionary/models.py index b22e4be42..1d2fbba39 100644 --- a/apps/dictionary/models.py +++ b/apps/dictionary/models.py @@ -4,7 +4,6 @@ # from django.db import models -from librarian import html from sortify import sortify from catalogue.models import Book @@ -21,6 +20,8 @@ class Note(models.Model): def notes_from_book(sender, **kwargs): + from librarian import html + Note.objects.filter(book=sender).delete() if sender.html_file: for anchor, text_str, html_str in html.extract_annotations(sender.html_file.path):