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
|
@property
|
||||||
def rating(self):
|
def rating(self):
|
||||||
"""x/5 star rating for a book"""
|
"""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
|
@property
|
||||||
def date_added(self):
|
def date_added(self):
|
||||||
|
|
Loading…
Reference in a new issue