Adds tests and fixes unset ordering warnings
This commit is contained in:
@ -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"))
|
||||
|
Reference in New Issue
Block a user