Commit d958c649 authored by Nicolas Delaby's avatar Nicolas Delaby

Manage None value in Query

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12578 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a51de38d
...@@ -304,6 +304,9 @@ class Query(QueryMixin): ...@@ -304,6 +304,9 @@ class Query(QueryMixin):
select_expression.append("MATCH %s AGAINST ('%s' %s) AS %s_relevance" % (key, value, mode,key.split('.')[1])) select_expression.append("MATCH %s AGAINST ('%s' %s) AS %s_relevance" % (key, value, mode,key.split('.')[1]))
else: else:
where_expression.append("%s = '%s'" % (key, value)) where_expression.append("%s = '%s'" % (key, value))
elif value is None:
where_expression.append("%s is NULL" % (key))
else: else:
where_expression.append("%s = %s" % (key, self._quoteSQLString(value))) where_expression.append("%s = %s" % (key, self._quoteSQLString(value)))
......
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