Fixes duplicate books in author page when there are mulitple authors

This commit is contained in:
Mouse Reeve 2021-10-25 11:06:54 -07:00
parent f2b11c6ad1
commit 24bf3f408c

View file

@ -35,7 +35,7 @@ class Author(View):
.filter(default_id=F("id")) .filter(default_id=F("id"))
.order_by("-first_published_date", "-published_date", "-created_date") .order_by("-first_published_date", "-published_date", "-created_date")
.prefetch_related("authors") .prefetch_related("authors")
) ).distinct()
paginated = Paginator(books, PAGE_LENGTH) paginated = Paginator(books, PAGE_LENGTH)
page = paginated.get_page(request.GET.get("page")) page = paginated.get_page(request.GET.get("page"))