forked from 0x2620/pandora
make layer itemKeys with filter=true show up in searching for *
This commit is contained in:
parent
5aeffcfb6a
commit
b5bc17f925
1 changed files with 4 additions and 0 deletions
|
@ -749,6 +749,7 @@ class Item(models.Model):
|
||||||
return changed
|
return changed
|
||||||
|
|
||||||
def update_find(self):
|
def update_find(self):
|
||||||
|
layer_keys = []
|
||||||
|
|
||||||
def save(key, value):
|
def save(key, value):
|
||||||
if value not in ('', None):
|
if value not in ('', None):
|
||||||
|
@ -791,6 +792,7 @@ class Item(models.Model):
|
||||||
qs = qs.filter(layer=i)
|
qs = qs.filter(layer=i)
|
||||||
qs = qs.order_by('start')
|
qs = qs.order_by('start')
|
||||||
save(i, u'\n'.join(filter(None, [l.findvalue for l in qs])))
|
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:
|
elif i != '*' and i not in self.facet_keys:
|
||||||
value = self.get(i)
|
value = self.get(i)
|
||||||
if isinstance(value, list):
|
if isinstance(value, list):
|
||||||
|
@ -798,6 +800,8 @@ class Item(models.Model):
|
||||||
save(i, value)
|
save(i, value)
|
||||||
|
|
||||||
for key in self.facet_keys:
|
for key in self.facet_keys:
|
||||||
|
if key in layer_keys:
|
||||||
|
continue
|
||||||
if key == 'title':
|
if key == 'title':
|
||||||
values = get_titles()
|
values = get_titles()
|
||||||
elif key == 'character':
|
elif key == 'character':
|
||||||
|
|
Loading…
Reference in a new issue