From 2ae257380ddfb8e0f283011eafdcc7bcd4914b7e Mon Sep 17 00:00:00 2001 From: j Date: Mon, 1 Nov 2021 10:57:58 +0000 Subject: [PATCH] director might not be set --- app/text/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/text/models.py b/app/text/models.py index c611c69..ee18be2 100644 --- a/app/text/models.py +++ b/app/text/models.py @@ -103,9 +103,10 @@ class Text(models.Model): item_id = clip['item'] cited[item_id] = { 'title': clip['title'], - 'director': clip['director'], 'id': item_id, } + if 'director' in clip: + cited[item_id]['director'] = clip['director'] for annotation in clip['layers'][layer]: if 'user' in self.data and annotation['user'] == self.data['user']: continue