X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/5e983f642ea537225bf3a20e97fca281c8fdc915..876c24227952faa17eda5d706cb0b3316d5ffe24:/apps/dictionary/models.py diff --git a/apps/dictionary/models.py b/apps/dictionary/models.py index 260617927..c0a92d101 100644 --- a/apps/dictionary/models.py +++ b/apps/dictionary/models.py @@ -25,6 +25,6 @@ def notes_from_book(sender, **kwargs): if sender.has_html_file: for anchor, text_str, html_str in html.extract_annotations(sender.html_file.path): Note.objects.create(book=sender, anchor=anchor, - html=html_str, sort_key=sortify(text_str)) + html=html_str, sort_key=sortify(text_str)[:128]) Book.html_built.connect(notes_from_book)