From ca8067769c76a030e779e72817525b80bf4fa338 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sun, 23 May 2021 08:48:00 -0700 Subject: [PATCH] Don't show deleted ratings in stars --- bookwyrm/templatetags/bookwyrm_tags.py | 1 + bookwyrm/views/shelf.py | 1 + 2 files changed, 2 insertions(+) diff --git a/bookwyrm/templatetags/bookwyrm_tags.py b/bookwyrm/templatetags/bookwyrm_tags.py index 3f33643bf..5cba5455f 100644 --- a/bookwyrm/templatetags/bookwyrm_tags.py +++ b/bookwyrm/templatetags/bookwyrm_tags.py @@ -25,6 +25,7 @@ def get_user_rating(book, user): user=user, book=book, rating__isnull=False, + deleted=False, ) .order_by("-published_date") .first() diff --git a/bookwyrm/views/shelf.py b/bookwyrm/views/shelf.py index 99e22fa95..538a8e343 100644 --- a/bookwyrm/views/shelf.py +++ b/bookwyrm/views/shelf.py @@ -62,6 +62,7 @@ class Shelf(View): user=user, rating__isnull=False, book__id=OuterRef("id"), + deleted=False, ).order_by("-published_date") if not is_self: