mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-01 04:48:44 +00:00
show books for authors who only have editions
This commit is contained in:
parent
3f95f9257d
commit
646df03d81
1 changed files with 2 additions and 1 deletions
|
@ -684,7 +684,8 @@ def author_page(request, author_id):
|
||||||
if is_api_request(request):
|
if is_api_request(request):
|
||||||
return JsonResponse(author.to_activity(), encoder=ActivityEncoder)
|
return JsonResponse(author.to_activity(), encoder=ActivityEncoder)
|
||||||
|
|
||||||
books = models.Work.objects.filter(authors=author)
|
books = models.Work.objects.filter(
|
||||||
|
Q(authors=author) | Q(editions__authors=author)).distinct()
|
||||||
data = {
|
data = {
|
||||||
'title': author.name,
|
'title': author.name,
|
||||||
'author': author,
|
'author': author,
|
||||||
|
|
Loading…
Reference in a new issue