Commit c8fa855c authored by Vincent Pelletier's avatar Vincent Pelletier

Oops, if value is a list-like type has just one item, use the item, not the value.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15450 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d11165cb
No related merge requests found
......@@ -404,7 +404,7 @@ class Query(QueryMixin):
escaped_value_string = ', '.join(escaped_value_list)
where_expression.append("%s IN (%s)" % (key, escaped_value_string))
elif len(value) == 1:
where_expression.append("%s == %s" % (key, self._quoteSQLString(value)))
where_expression.append("%s == %s" % (key, self._quoteSQLString(value[0])))
else:
where_expression.append('0') # "foo IN ()" is invalid SQL syntax, so use a "false" value.
else:
......
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