From 3088beb5bc15b74e9e645384b09a46220c983a07 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 18 Dec 2014 18:26:34 +0000 Subject: [PATCH] layer --- pandora/annotation/tasks.py | 2 ++ 1 file changed, 2 insertions(+) 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':