forked from mirrors/bookwyrm
Fixes serializing reviews with no rating
This commit is contained in:
parent
2afa111b70
commit
39b9fe8f4a
1 changed files with 7 additions and 2 deletions
|
@ -192,9 +192,14 @@ class Review(Status):
|
||||||
@property
|
@property
|
||||||
def ap_pure_name(self):
|
def ap_pure_name(self):
|
||||||
''' clarify review names for mastodon serialization '''
|
''' clarify review names for mastodon serialization '''
|
||||||
return 'Review of "%s" (%d stars): %s' % (
|
if self.rating:
|
||||||
|
return 'Review of "%s" (%d stars): %s' % (
|
||||||
|
self.book.title,
|
||||||
|
self.rating,
|
||||||
|
self.name
|
||||||
|
)
|
||||||
|
return 'Review of "%s": %s' % (
|
||||||
self.book.title,
|
self.book.title,
|
||||||
self.rating,
|
|
||||||
self.name
|
self.name
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue