show books for authors who only have editions

This commit is contained in:
Mouse Reeve 2020-12-20 11:51:17 -08:00
parent 3f95f9257d
commit 646df03d81

View file

@ -684,7 +684,8 @@ def author_page(request, author_id):
if is_api_request(request):
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 = {
'title': author.name,
'author': author,