inbetween queries
This commit is contained in:
parent
9da8c75f70
commit
00c8f47541
2 changed files with 4 additions and 5 deletions
|
@ -72,7 +72,7 @@ def parseCondition(condition, user):
|
|||
if exclude:
|
||||
q = ~q
|
||||
return q
|
||||
elif isinstance(v, list) and len(v) == 2:
|
||||
elif isinstance(v, list) and len(v) == 2 and op == '=':
|
||||
q = parseCondition({'key': k, 'value': v[0], 'operator': '>='}, user) \
|
||||
& parseCondition({'key': k, 'value': v[1], 'operator': '<'}, user)
|
||||
if exclude:
|
||||
|
|
|
@ -34,13 +34,12 @@ def parseCondition(condition, user):
|
|||
exclude = True
|
||||
else:
|
||||
exclude = False
|
||||
if op == '-':
|
||||
if isinstance(v, list) and len(v) == 2 and op == '=':
|
||||
q = parseCondition({'key': k, 'value': v[0], 'operator': '>='}, user) \
|
||||
& parseCondition({'key': k, 'value': v[1], 'operator': '<'}, user)
|
||||
if exclude:
|
||||
return ~q
|
||||
else:
|
||||
return q
|
||||
q = ~q
|
||||
return q
|
||||
if k == 'id':
|
||||
v = decode_id(v)
|
||||
if isinstance(v, bool): #featured and public flag
|
||||
|
|
Loading…
Reference in a new issue