From 4fe4070e1f9f9bd21e2323c1328cbbbf92bba06d Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 13 Feb 2014 11:08:28 +0000 Subject: [PATCH] update facets if layer in facet_keys --- pandora/annotation/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/annotation/tasks.py b/pandora/annotation/tasks.py index 1e80800e..6f26cb1e 100644 --- a/pandora/annotation/tasks.py +++ b/pandora/annotation/tasks.py @@ -82,7 +82,7 @@ def add_annotations(data): value=a['value']) annotation.save() #update facets if needed - if filter(lambda f: f['id'] == layer_id and f.get('filter'), settings.CONFIG['itemKeys']): + if layer_id in item.facet_keys: item.update_layer_facet(layer_id) Item.objects.filter(id=item.id).update(modified=annotation.modified) annotation.item.modified = annotation.modified