diff --git a/pandora/annotation/tasks.py b/pandora/annotation/tasks.py index ac32d496..ae43f083 100644 --- a/pandora/annotation/tasks.py +++ b/pandora/annotation/tasks.py @@ -74,6 +74,8 @@ def add_annotations(data): layer = filter(lambda l: l['id'] == layer_id, settings.CONFIG['layers']) if not layer: return False + else: + layer = layer[0] user = User.objects.get(username=data['user']) for a in data['annotations']: if layer['type'] == 'entity':