forked from mirrors/bookwyrm
fix rating property on ImportItem
This commit is contained in:
parent
711772046f
commit
85a8210f5e
1 changed files with 3 additions and 1 deletions
|
@ -128,7 +128,9 @@ class ImportItem(models.Model):
|
|||
@property
|
||||
def rating(self):
|
||||
"""x/5 star rating for a book"""
|
||||
return int(self.data["My Rating"])
|
||||
if self.data.get("My Rating", None):
|
||||
return int(self.data["My Rating"])
|
||||
return None
|
||||
|
||||
@property
|
||||
def date_added(self):
|
||||
|
|
Loading…
Reference in a new issue