Adds tests and fixes unset ordering warnings
This commit is contained in:
parent
d706b26ac9
commit
72dc21e82a
2 changed files with 28 additions and 3 deletions
|
@ -33,7 +33,9 @@ class Author(View):
|
|||
.filter(Q(authors=author) | Q(parent_work__authors=author))
|
||||
.annotate(default_id=Subquery(default_editions.values("id")[:1]))
|
||||
.filter(default_id=F("id"))
|
||||
).prefetch_related("authors")
|
||||
.order_by("-first_published_date", "-published_date", "-created_date")
|
||||
.prefetch_related("authors")
|
||||
)
|
||||
|
||||
paginated = Paginator(books, PAGE_LENGTH)
|
||||
page = paginated.get_page(request.GET.get("page"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue