From 9ffab814afe7f3d2a2df768decc00874ed8b0ca2 Mon Sep 17 00:00:00 2001 From: Adam Kelly Date: Tue, 28 Apr 2020 15:16:41 +0100 Subject: [PATCH] Don't crash if we don't recognise the exclusive shelf. --- fedireads/models/import_job.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fedireads/models/import_job.py b/fedireads/models/import_job.py index 2465fe12..28555c0f 100644 --- a/fedireads/models/import_job.py +++ b/fedireads/models/import_job.py @@ -89,7 +89,7 @@ class ImportItem(models.Model): def shelf(self): ''' the goodreads shelf field ''' if self.data['Exclusive Shelf']: - return GOODREADS_SHELVES[self.data['Exclusive Shelf']] + return GOODREADS_SHELVES.get(self.data['Exclusive Shelf']) @property def review(self):