director might not be set

This commit is contained in:
j 2021-11-01 10:57:58 +00:00
parent 9241e10fae
commit 2ae257380d

View file

@ -103,9 +103,10 @@ class Text(models.Model):
item_id = clip['item'] item_id = clip['item']
cited[item_id] = { cited[item_id] = {
'title': clip['title'], 'title': clip['title'],
'director': clip['director'],
'id': item_id, 'id': item_id,
} }
if 'director' in clip:
cited[item_id]['director'] = clip['director']
for annotation in clip['layers'][layer]: for annotation in clip['layers'][layer]:
if 'user' in self.data and annotation['user'] == self.data['user']: if 'user' in self.data and annotation['user'] == self.data['user']:
continue continue