mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-24 00:50:35 +00:00
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