clear cache on remove, do not overwrite query but just set default, within
This commit is contained in:
parent
2b4c70056d
commit
9eccc030a1
2 changed files with 12 additions and 5 deletions
|
|
@ -31,6 +31,9 @@ def parseCondition(condition, user):
|
|||
exclude = True
|
||||
else:
|
||||
exclude = False
|
||||
if op == '-':
|
||||
return parseCondition({'key': k, 'value': v[0], 'operator': '>='}, user) \
|
||||
& parseCondition({'key': k, 'value': v[1], 'operator': '<'}, user)
|
||||
if k == 'id':
|
||||
v = v.split('/')
|
||||
if len(v) == 2:
|
||||
|
|
@ -40,7 +43,7 @@ def parseCondition(condition, user):
|
|||
return q
|
||||
if isinstance(v, bool): #featured and public flag
|
||||
key = k
|
||||
elif key in ('lat', 'lng', 'area', 'south', 'west', 'north', 'east', 'matches'):
|
||||
elif k in ('lat', 'lng', 'area', 'south', 'west', 'north', 'east', 'matches'):
|
||||
if op == '>':
|
||||
key = '%s__gt'%k
|
||||
elif op == '>=':
|
||||
|
|
@ -49,7 +52,8 @@ def parseCondition(condition, user):
|
|||
key = '%s__lt'%k
|
||||
elif op == '<=':
|
||||
key = '%s__lte'%k
|
||||
#default is exact match
|
||||
else: #default is exact match
|
||||
key = k
|
||||
else:
|
||||
if op == '=':
|
||||
key = '%s__iexact'%k
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue