Don't crash if we don't recognise the exclusive shelf.

This commit is contained in:
Adam Kelly 2020-04-28 15:16:41 +01:00
parent 543cc29ee1
commit 9ffab814af

View file

@ -89,7 +89,7 @@ class ImportItem(models.Model):
def shelf(self): def shelf(self):
''' the goodreads shelf field ''' ''' the goodreads shelf field '''
if self.data['Exclusive Shelf']: if self.data['Exclusive Shelf']:
return GOODREADS_SHELVES[self.data['Exclusive Shelf']] return GOODREADS_SHELVES.get(self.data['Exclusive Shelf'])
@property @property
def review(self): def review(self):