forked from 0x2620/pandora
layer facets too
This commit is contained in:
parent
079b0051c0
commit
1c80fb1f08
1 changed files with 1 additions and 0 deletions
|
@ -809,6 +809,7 @@ class Item(models.Model):
|
||||||
def update_layer_facet(self, key):
|
def update_layer_facet(self, key):
|
||||||
current_values = [a['value']
|
current_values = [a['value']
|
||||||
for a in self.annotations.filter(layer=key).distinct().values('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)]
|
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)
|
removed_values = filter(lambda i: i not in current_values, saved_values)
|
||||||
if removed_values:
|
if removed_values:
|
||||||
|
|
Loading…
Reference in a new issue