X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/8a078a30db08afb680c48ce94d6e576236febeed..e466cef774f05a0c2fd99df7b8e714d0da2b9773:/src/catalogue/models/book.py?ds=inline 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."""