From 521f917d014f2495547502101b367547d05cb956 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sun, 4 Apr 2021 09:05:21 -0700 Subject: [PATCH] Pass existing rating to stars form element as variable --- bookwyrm/templates/snippets/form_rate_stars.html | 6 +++--- bookwyrm/templates/snippets/rate_action.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bookwyrm/templates/snippets/form_rate_stars.html b/bookwyrm/templates/snippets/form_rate_stars.html index 25544739e..3abebac04 100644 --- a/bookwyrm/templates/snippets/form_rate_stars.html +++ b/bookwyrm/templates/snippets/form_rate_stars.html @@ -13,7 +13,7 @@ type="radio" name="rating" value="0" - {% if book|user_rating:user == 0 %}checked{% endif %} + {% if default_rating == 0 or not default_rating %}checked{% endif %} >