From 1c80fb1f081f90f2e80276bbf2f598609aa4c99e Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 24 Apr 2012 19:13:44 +0200 Subject: [PATCH] layer facets too --- pandora/item/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora/item/models.py b/pandora/item/models.py index c863bc2d..0e7cdc2e 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -809,6 +809,7 @@ class Item(models.Model): def update_layer_facet(self, key): current_values = [a['value'] for a in self.annotations.filter(layer=key).distinct().values('value')] + current_values = [ox.decodeHtml(v) for v in current_values] saved_values = [i.value for i in Facet.objects.filter(item=self, key=key)] removed_values = filter(lambda i: i not in current_values, saved_values) if removed_values: