Commit 57c438c6 authored by Yusei Tahara's avatar Yusei Tahara

Allow 0(zero) value. This is needed for "non-left join" version of

predicate category search.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36095 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 08e191cf
......@@ -1535,8 +1535,8 @@ class CategoryTool( UniqueObject, Folder, Base ):
(category_uid_name, renderUIDWithOperator(base_category_uid)))
else:
# In any other case, allow it.
where_expression_list.append('(%s IS NULL OR %s IN (%s))' % \
(category_uid_name, category_uid_name,
where_expression_list.append('(%s IS NULL OR %s = 0 OR %s IN (%s))' % \
(category_uid_name, category_uid_name, category_uid_name,
', '.join([renderUIDValue(x) for x in category_uid_list])))
result['from_expression'] = {catalog_table_name:
('\nLEFT JOIN `%s` AS ' % (query_table, )).join(left_join_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