From 49ceb2a9780035dc9b7a4634b18110cda7e3a485 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Fri, 4 Feb 2022 19:41:21 -0800 Subject: [PATCH] Fixes warning in author view tests --- bookwyrm/views/author.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookwyrm/views/author.py b/bookwyrm/views/author.py index b50653f9..c3e456ef 100644 --- a/bookwyrm/views/author.py +++ b/bookwyrm/views/author.py @@ -28,7 +28,7 @@ class Author(View): books = models.Work.objects.filter( Q(authors=author) | Q(editions__authors=author) - ).distinct() + ).order_by("-published_date").distinct() paginated = Paginator(books, PAGE_LENGTH) page = paginated.get_page(request.GET.get("page"))