Merge pull request #1320 from bookwyrm-social/books-warning

Resolves warning in books view
This commit is contained in:
Mouse Reeve 2021-08-21 12:50:40 -06:00 committed by GitHub
commit accfbbfd90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,7 +62,7 @@ class Book(View):
queryset = queryset.filter(user=request.user, deleted=False) queryset = queryset.filter(user=request.user, deleted=False)
else: else:
queryset = reviews.exclude(Q(content__isnull=True) | Q(content="")) queryset = reviews.exclude(Q(content__isnull=True) | Q(content=""))
queryset = queryset.select_related("user") queryset = queryset.select_related("user").order_by("-published_date")
paginated = Paginator(queryset, PAGE_LENGTH) paginated = Paginator(queryset, PAGE_LENGTH)
lists = privacy_filter( lists = privacy_filter(