update facets if layer in facet_keys

This commit is contained in:
j 2014-02-13 11:08:28 +00:00
parent ccb4a13569
commit 4fe4070e1f

View file

@ -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