fix queries in smart lists

This commit is contained in:
j 2013-03-03 14:46:37 +00:00
parent fea340bc68
commit a89e654c6d

View file

@ -229,12 +229,12 @@ def parseConditions(conditions, operator, user):
if 'conditions' in condition:
q = parseConditions(condition['conditions'],
condition.get('operator', '&'), user)
if isinstance(q, list):
conn += q
elif q:
conn.append(q)
else:
conn.append(parseCondition(condition, user))
q = parseCondition(condition, user)
if isinstance(q, list):
conn += q
elif q:
conn.append(q)
if conn:
if operator == '|':
q = conn[0]