Don't show books lists when item isn't approved

This commit is contained in:
Mouse Reeve 2021-03-07 08:37:39 -08:00
parent 4eefe33d9b
commit 5ddb3b810e

View file

@ -89,7 +89,7 @@ class Book(View):
'rating': reviews.aggregate(Avg('rating'))['rating__avg'],
'tags': models.UserTag.objects.filter(book=book),
'lists': privacy_filter(
request.user, book.list_set.all()
request.user, book.list_set.filter(listitem__approved=True)
),
'user_tags': user_tags,
'user_shelves': user_shelves,