Commit cefcb394 authored by Jérome Perrin's avatar Jérome Perrin

test ignore_empty_string as a boolean, not an int


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22236 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0c932f14
...@@ -211,7 +211,9 @@ class SimpleQuery(QueryMixin): ...@@ -211,7 +211,9 @@ class SimpleQuery(QueryMixin):
# do not further generate sql expressions because # do not further generate sql expressions because
# we ignore empty strings by default # we ignore empty strings by default
return sql_expressions return sql_expressions
elif ignore_empty_string==0 and isinstance(value, basestring) and value.strip() == '': elif (not ignore_empty_string) \
and isinstance(value, basestring) \
and value.strip() == '':
# explicitly requested not to ignore empty strings # explicitly requested not to ignore empty strings
sql_expressions = {'where_expression': "%s = ''" %key, sql_expressions = {'where_expression': "%s = ''" %key,
'select_expression_list': []} '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