X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/5411431fe8c247572635a206cc977816dded415c..ba08b7b1c9b48ce1d0ebde7d259dc777ff98162a:/apps/dictionary/models.py 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):