forked from 0x2620/pandora
fix other find queries
This commit is contained in:
parent
e7255e6af6
commit
af340843d8
1 changed files with 2 additions and 1 deletions
|
@ -78,7 +78,7 @@ def parseCondition(condition, user):
|
||||||
'$': '__iendswith',
|
'$': '__iendswith',
|
||||||
}.get(op, '__icontains')
|
}.get(op, '__icontains')
|
||||||
v = models.Item.objects.filter(**{'facets__key':k, facet_value:v})
|
v = models.Item.objects.filter(**{'facets__key':k, facet_value:v})
|
||||||
k = 'id__in'
|
value_key = 'id__in'
|
||||||
else:
|
else:
|
||||||
value_key = '%s%s' % (value_key, {
|
value_key = '%s%s' % (value_key, {
|
||||||
'==': '__iexact',
|
'==': '__iexact',
|
||||||
|
@ -91,6 +91,7 @@ def parseCondition(condition, user):
|
||||||
}.get(op, '__icontains'))
|
}.get(op, '__icontains'))
|
||||||
|
|
||||||
k = str(k)
|
k = str(k)
|
||||||
|
value_key = str(value_key)
|
||||||
if exclude:
|
if exclude:
|
||||||
if k == '*':
|
if k == '*':
|
||||||
q = ~Q(**{value_key: v})
|
q = ~Q(**{value_key: v})
|
||||||
|
|
Loading…
Reference in a new issue