From 5ddb3b810e800648d8607026d97bdad611cb4d65 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sun, 7 Mar 2021 08:37:39 -0800 Subject: [PATCH 1/2] Don't show books lists when item isn't approved --- bookwyrm/views/books.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookwyrm/views/books.py b/bookwyrm/views/books.py index 4d6afba9..cf246446 100644 --- a/bookwyrm/views/books.py +++ b/bookwyrm/views/books.py @@ -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, From a70264c12c71b1a08ee86d53da71480cc769c7a1 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sun, 7 Mar 2021 08:42:30 -0800 Subject: [PATCH 2/2] Fixes showing link to user lists --- bookwyrm/templates/snippets/status/status_header.html | 2 ++ bookwyrm/templates/user/user_layout.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bookwyrm/templates/snippets/status/status_header.html b/bookwyrm/templates/snippets/status/status_header.html index a9a8d72c..cecdddf6 100644 --- a/bookwyrm/templates/snippets/status/status_header.html +++ b/bookwyrm/templates/snippets/status/status_header.html @@ -1,7 +1,9 @@ {% load bookwyrm_tags %} {% load i18n %} + {% include 'snippets/avatar.html' with user=status.user ariaHide="true" %} {% include 'snippets/username.html' with user=status.user %} + {% if status.status_type == 'GeneratedNote' %} {{ status.content | safe }} diff --git a/bookwyrm/templates/user/user_layout.html b/bookwyrm/templates/user/user_layout.html index d7629160..75dc61dc 100644 --- a/bookwyrm/templates/user/user_layout.html +++ b/bookwyrm/templates/user/user_layout.html @@ -56,7 +56,7 @@ {% trans "Reading Goal" %} {% endif %} - {% if is_self or user.lists.exists %} + {% if is_self or user.list_set.exists %} {% url 'user-lists' user|username as url %} {% trans "Lists" %}