Don't display zero stars if there wasn't a rating

This commit is contained in:
Adam Kelly 2020-04-02 10:08:52 +01:00
parent ae191731dc
commit cceb433620

View file

@ -19,6 +19,8 @@ def stars(number):
number = int(number)
except (ValueError, TypeError):
number = 0
if not number:
return ''
return ('' * number) + '' * (5 - number)