Commit bb3e6ca5 authored by Vincent Pelletier's avatar Vincent Pelletier

Fix query generation from an abstract syntax tree containing a "not" logical operator.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26142 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bec0e1cb
......@@ -1936,8 +1936,12 @@ class Catalog(Folder,
if subquery is not None:
append(subquery)
logical_operator = node.getLogicalOperator()
if logical_operator == 'not':
query_logical_operator = None
else:
query_logical_operator = logical_operator
for comparison_operator, value_list in value_dict.iteritems():
append(search_key.buildQuery(value_list, comparison_operator=comparison_operator, logical_operator=logical_operator))
append(search_key.buildQuery(value_list, comparison_operator=comparison_operator, logical_operator=query_logical_operator))
if logical_operator == 'not' or len(query_list) > 1:
result = ComplexQuery(query_list, logical_operator=logical_operator)
elif len(query_list) == 1:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment