From b5bc17f92534296d05a9309c318d42df74febcc6 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 30 Jun 2016 00:17:23 +0200 Subject: [PATCH] make layer itemKeys with filter=true show up in searching for * --- pandora/item/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora/item/models.py b/pandora/item/models.py index b2a122a8..f4c45f9a 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -749,6 +749,7 @@ class Item(models.Model): return changed def update_find(self): + layer_keys = [] def save(key, value): if value not in ('', None): @@ -791,6 +792,7 @@ class Item(models.Model): qs = qs.filter(layer=i) qs = qs.order_by('start') save(i, u'\n'.join(filter(None, [l.findvalue for l in qs]))) + layer_keys.append(i) elif i != '*' and i not in self.facet_keys: value = self.get(i) if isinstance(value, list): @@ -798,6 +800,8 @@ class Item(models.Model): save(i, value) for key in self.facet_keys: + if key in layer_keys: + continue if key == 'title': values = get_titles() elif key == 'character':