fix validation of nested queries

This commit is contained in:
j 2016-01-07 12:25:09 +05:30
parent 7c438dc6b2
commit c166f19f80

View file

@ -131,7 +131,7 @@ def validate_conditions(conditions):
if 'conditions' in c:
if list(sorted(c.keys())) != ['conditions', 'operator']:
raise Exception('invalid query condition', c)
validate_conditions(c)
validate_conditions(c['conditions'])
else:
if list(sorted(c.keys())) != ['key', 'operator', 'value']:
raise Exception('invalid query condition', c)