forked from 0x2620/pandora
avoid duplicated keys in nested queries
This commit is contained in:
parent
83765d91d8
commit
68b2482ede
1 changed files with 5 additions and 1 deletions
|
@ -145,7 +145,11 @@ class ClipManager(Manager):
|
|||
keys = layer_ids + ['annotations', 'text', '*']
|
||||
conditions = data.get('query', {}).get('conditions', [])
|
||||
conditions = flatten_conditions(conditions)
|
||||
conditions = list(filter(lambda c: c.get('key') in keys, conditions))
|
||||
conditions_ = []
|
||||
for c in conditions:
|
||||
if c.get('key') in keys and c not in conditions_:
|
||||
conditions_.append(c)
|
||||
conditions = conditions_
|
||||
operator = data.get('query', {}).get('operator', '&')
|
||||
|
||||
def parse(condition):
|
||||
|
|
Loading…
Reference in a new issue