From a73960a0da25fba82f4a6fb4185f69d102b3a000 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Fri, 4 Feb 2022 19:44:03 -0800 Subject: [PATCH] Python formatting --- bookwyrm/views/author.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bookwyrm/views/author.py b/bookwyrm/views/author.py index c3e456ef..b4eb7ef5 100644 --- a/bookwyrm/views/author.py +++ b/bookwyrm/views/author.py @@ -26,9 +26,11 @@ class Author(View): if is_api_request(request): return ActivitypubResponse(author.to_activity()) - books = models.Work.objects.filter( - Q(authors=author) | Q(editions__authors=author) - ).order_by("-published_date").distinct() + books = ( + models.Work.objects.filter(Q(authors=author) | Q(editions__authors=author)) + .order_by("-published_date") + .distinct() + ) paginated = Paginator(books, PAGE_LENGTH) page = paginated.get_page(request.GET.get("page"))