X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/8a078a30db08afb680c48ce94d6e576236febeed..f0d9161da1b3fe4d3a528f95df30e26d221f73d4:/src/catalogue/models/book.py?ds=sidebyside diff --git a/src/catalogue/models/book.py b/src/catalogue/models/book.py index 97677bdee..d3eddfd71 100644 --- a/src/catalogue/models/book.py +++ b/src/catalogue/models/book.py @@ -836,7 +836,7 @@ class Book(models.Model): def related_themes(self): return Tag.objects.usage_for_queryset( Fragment.objects.filter(models.Q(book=self) | models.Q(book__ancestor=self)), - counts=True).filter(category='theme') + counts=True).filter(category='theme').order_by('-count') def parent_cover_changed(self): """Called when parent book's cover image is changed."""