forked from 0x2620/pandora
fix #2570
This commit is contained in:
parent
25d794e803
commit
1ac959623e
1 changed files with 2 additions and 2 deletions
|
@ -132,7 +132,7 @@ def parseCondition(condition, user, owner=None):
|
||||||
elif key_type == 'boolean':
|
elif key_type == 'boolean':
|
||||||
q = Q(**{'find__key': k, 'find__value': v})
|
q = Q(**{'find__key': k, 'find__value': v})
|
||||||
if exclude:
|
if exclude:
|
||||||
q = ~q
|
q = ~Q(id__in=models.Item.objects.filter(q))
|
||||||
return q
|
return q
|
||||||
elif key_type == "string":
|
elif key_type == "string":
|
||||||
in_find = not k.startswith('public_id')
|
in_find = not k.startswith('public_id')
|
||||||
|
@ -158,7 +158,7 @@ def parseCondition(condition, user, owner=None):
|
||||||
else:
|
else:
|
||||||
q = Q(**{value_key: v})
|
q = Q(**{value_key: v})
|
||||||
if exclude:
|
if exclude:
|
||||||
q = ~q
|
q = ~Q(id__in=models.Item.objects.filter(q))
|
||||||
return q
|
return q
|
||||||
elif k == 'list':
|
elif k == 'list':
|
||||||
q = Q(id=0)
|
q = Q(id=0)
|
||||||
|
|
Loading…
Reference in a new issue