mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-27 03:51:08 +00:00
Formatting for ratings without reviews.
This commit is contained in:
parent
b5a5a63e88
commit
5edef615c8
1 changed files with 6 additions and 1 deletions
|
@ -25,12 +25,17 @@ def get_comment(comment):
|
|||
def get_review_article(review):
|
||||
''' a book review formatted for a non-fedireads isntance (mastodon) '''
|
||||
status = get_status(review)
|
||||
if review.rating:
|
||||
if review.rating and review.name:
|
||||
name = 'Review of "%s" (%d stars): %s' % (
|
||||
review.book.title,
|
||||
review.rating,
|
||||
review.name
|
||||
)
|
||||
elif review.rating:
|
||||
name = 'Rated "%s" (%d stars)' % (
|
||||
review.book.title,
|
||||
review.rating,
|
||||
)
|
||||
else:
|
||||
name = 'Review of "%s": %s' % (
|
||||
review.book.title,
|
||||
|
|
Loading…
Reference in a new issue