diff --git a/bookwyrm/templates/book/book.html b/bookwyrm/templates/book/book.html
index cfa400d62..97f105bf7 100644
--- a/bookwyrm/templates/book/book.html
+++ b/bookwyrm/templates/book/book.html
@@ -251,7 +251,7 @@
{% url 'book' book.id as tab_url %}
-
- {% trans "Reviews" %}
+ {% trans "Reviews" %} ({{ review_count }})
{% if user_statuses.review_count %}
{% url 'book-user-statuses' book.id 'review' as tab_url %}
diff --git a/bookwyrm/urls.py b/bookwyrm/urls.py
index b85a81e0c..53ceeaa83 100644
--- a/bookwyrm/urls.py
+++ b/bookwyrm/urls.py
@@ -261,7 +261,11 @@ urlpatterns = [
re_path(r"^unboost/(?P\d+)/?$", views.Unboost.as_view()),
# books
re_path(r"%s(.json)?/?$" % book_path, views.Book.as_view(), name="book"),
- re_path(r"%s/(?Preview|comment|quote)/?$" % book_path, views.Book.as_view(), name="book-user-statuses"),
+ re_path(
+ r"%s/(?Preview|comment|quote)/?$" % book_path,
+ views.Book.as_view(),
+ name="book-user-statuses",
+ ),
re_path(r"%s/edit/?$" % book_path, views.EditBook.as_view()),
re_path(r"%s/confirm/?$" % book_path, views.ConfirmEditBook.as_view()),
re_path(r"^create-book/?$", views.EditBook.as_view()),
diff --git a/bookwyrm/views/books.py b/bookwyrm/views/books.py
index 67b3792ef..829408a8b 100644
--- a/bookwyrm/views/books.py
+++ b/bookwyrm/views/books.py
@@ -47,25 +47,22 @@ class Book(View):
# all reviews for the book
reviews = privacy_filter(
- request.user,
- models.Review.objects.filter(book__in=work.editions.all())
+ request.user, models.Review.objects.filter(book__in=work.editions.all())
)
# the reviews to show
if user_statuses and request.user.is_authenticated:
- if user_statuses == 'review':
+ if user_statuses == "review":
queryset = book.review_set
- elif user_statuses == 'comment':
+ elif user_statuses == "comment":
queryset = book.comment_set
else:
queryset = book.quotation_set
- paginated = Paginator(
- queryset.filter(user=request.user), PAGE_LENGTH
- )
+ queryset = queryset.filter(user=request.user)
else:
- paginated = Paginator(
- reviews.exclude(Q(content__isnull=True) | Q(content="")), PAGE_LENGTH
- )
+ queryset = reviews.exclude(Q(content__isnull=True) | Q(content=""))
+ paginated = Paginator(queryset, PAGE_LENGTH)
+
data = {
"book": book,
"statuses": paginated.get_page(request.GET.get("page")),