X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/5411431fe8c247572635a206cc977816dded415c..fd6f7d44a0a5c9446ce77fd846cb8bc938c26575:/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):