forked from 0x2620/pandora
look in the right place, fixes #2989
This commit is contained in:
parent
f1f541fc0b
commit
f71240ac2c
1 changed files with 3 additions and 1 deletions
|
@ -142,7 +142,8 @@ def buildCondition(k, op, v, user, exclude=False, owner=None):
|
|||
k = str(k)
|
||||
value_key = str(value_key)
|
||||
if k == '*':
|
||||
q = Q(**{value_key: v})
|
||||
q = Q(**{'find__value' + get_operator(op): v}) | \
|
||||
Q(**{'facets__value' + get_operator(op, 'istr'): v})
|
||||
elif in_find:
|
||||
q = Q(**{'find__key': k, value_key: v})
|
||||
else:
|
||||
|
@ -257,6 +258,7 @@ class DocumentManager(Manager):
|
|||
user, item)
|
||||
if conditions:
|
||||
qs = qs.filter(conditions)
|
||||
qs = qs.distinct()
|
||||
|
||||
#anonymous can only see public items
|
||||
if not user or user.is_anonymous():
|
||||
|
|
Loading…
Reference in a new issue