X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/60b06883b6d5a336ef47c01103ec1ce25aafae69..dbb6eb3883a5f5e371f4bf7c89e74326feca0fd1:/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):