mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-23 08:36:32 +00:00
Python formatting
This commit is contained in:
parent
49ceb2a978
commit
a73960a0da
1 changed files with 5 additions and 3 deletions
|
@ -26,9 +26,11 @@ class Author(View):
|
||||||
if is_api_request(request):
|
if is_api_request(request):
|
||||||
return ActivitypubResponse(author.to_activity())
|
return ActivitypubResponse(author.to_activity())
|
||||||
|
|
||||||
books = models.Work.objects.filter(
|
books = (
|
||||||
Q(authors=author) | Q(editions__authors=author)
|
models.Work.objects.filter(Q(authors=author) | Q(editions__authors=author))
|
||||||
).order_by("-published_date").distinct()
|
.order_by("-published_date")
|
||||||
|
.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"))
|
||||||
|
|
Loading…
Reference in a new issue