This commit is contained in:
j 2014-12-18 18:26:34 +00:00
parent 7cfdf7b8db
commit 3088beb5bc

View file

@ -74,6 +74,8 @@ def add_annotations(data):
layer = filter(lambda l: l['id'] == layer_id, settings.CONFIG['layers']) layer = filter(lambda l: l['id'] == layer_id, settings.CONFIG['layers'])
if not layer: if not layer:
return False return False
else:
layer = layer[0]
user = User.objects.get(username=data['user']) user = User.objects.get(username=data['user'])
for a in data['annotations']: for a in data['annotations']:
if layer['type'] == 'entity': if layer['type'] == 'entity':