From cceb43362000429267ec672032429b4428a5fa6c Mon Sep 17 00:00:00 2001 From: Adam Kelly Date: Thu, 2 Apr 2020 10:08:52 +0100 Subject: [PATCH] Don't display zero stars if there wasn't a rating --- fedireads/templatetags/fr_display.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fedireads/templatetags/fr_display.py b/fedireads/templatetags/fr_display.py index 7af5be26b..76b1efafc 100644 --- a/fedireads/templatetags/fr_display.py +++ b/fedireads/templatetags/fr_display.py @@ -19,6 +19,8 @@ def stars(number): number = int(number) except (ValueError, TypeError): number = 0 + if not number: + return '' return ('★' * number) + '☆' * (5 - number)