Commit 23b66aa3 authored by Jérome Perrin's avatar Jérome Perrin

don't use [] as default values because it's generally wrong and because sql

worklist generation sometimes passes None


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22234 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8ed7ba23
......@@ -153,9 +153,9 @@ class SimpleQuery(QueryMixin):
'select_expression_list': select_expression_list,}
return sql_expressions
def asSQLExpression(self, key_alias_dict = None, keyword_search_keys = [],
datetime_search_keys = [], full_text_search_keys = [],
ignore_empty_string = 1, stat__ = 0):
def asSQLExpression(self, key_alias_dict=None, keyword_search_keys=None,
datetime_search_keys=None, full_text_search_keys=None,
ignore_empty_string=1, stat__=0):
"""
Build the sql expressions string
"""
......@@ -169,6 +169,13 @@ class SimpleQuery(QueryMixin):
range_value = self.getRange()
search_key = self.getSearchKey()
if keyword_search_keys is None:
keyword_search_keys = []
if datetime_search_keys is None:
datetime_search_keys = []
if full_text_search_keys is None:
full_text_search_keys = []
# key can have an alias definition which we should acquire
if key_alias_dict is not None:
key = key_alias_dict.get(key, None)
......
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