forked from mirrors/bookwyrm
Don't display zero stars if there wasn't a rating
This commit is contained in:
parent
ae191731dc
commit
cceb433620
1 changed files with 2 additions and 0 deletions
|
@ -19,6 +19,8 @@ def stars(number):
|
|||
number = int(number)
|
||||
except (ValueError, TypeError):
|
||||
number = 0
|
||||
if not number:
|
||||
return ''
|
||||
return ('★' * number) + '☆' * (5 - number)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue