Commit bc72b18e authored by Sebastien Robin's avatar Sebastien Robin

parenthesis where missing when we joind many where expressions, this should fix testInventory

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12043 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f13ae1a1
...@@ -1917,6 +1917,8 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base): ...@@ -1917,6 +1917,8 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base):
# Concatenate expressions # Concatenate expressions
if kw.get('where_expression',None) not in (None,''): if kw.get('where_expression',None) not in (None,''):
where_expression_list.append(kw['where_expression']) where_expression_list.append(kw['where_expression'])
if len(where_expression_list)>1:
where_expression_list = ['(%s)' % x for x in where_expression_list]
where_expression = join(where_expression_list, ' AND ') where_expression = join(where_expression_list, ' AND ')
select_expression= join(select_expression_list,',') select_expression= join(select_expression_list,',')
......
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