From d94a01f36a822e9c4c8f7713d41065d8782fcd24 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 26 Mar 2020 11:09:02 +0100 Subject: [PATCH] Minor API fix. --- src/catalogue/models/book.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/catalogue/models/book.py b/src/catalogue/models/book.py index 81f3b79f8..d78a751d4 100644 --- a/src/catalogue/models/book.py +++ b/src/catalogue/models/book.py @@ -173,7 +173,7 @@ class Book(models.Model): return self.tag_unicode('genre') def translators(self): - translators = self.get_extra_info_json().get('translators') + translators = self.get_extra_info_json().get('translators') or [] return [ '\xa0'.join(reversed(translator.split(', ', 1))) for translator in translators ] -- 2.20.1