From 14682ed8c687590b3ebb5be299a9399419fec0db Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 20 Oct 2021 18:04:29 -0700 Subject: [PATCH] Prefect related data in author view --- 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 9a3d582d6..4f29e2af6 100644 --- a/bookwyrm/views/author.py +++ b/bookwyrm/views/author.py @@ -34,7 +34,7 @@ class Author(View): ) .annotate(default_id=Subquery(default_editions.values("id")[:1])) .filter(default_id=F("id")) - ) + ).prefetch_related("authors") paginated = Paginator(books, PAGE_LENGTH) page = paginated.get_page(request.GET.get("page"))