Commit 2e3c2046 authored by Sebastien Robin's avatar Sebastien Robin

use 0 for None values instead of NULL in order to make it compatible with primary keys

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19699 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3167bdfc
......@@ -149,12 +149,13 @@ class DomainTool(BaseTool):
if tested_base_category_list != []:
# Add predicate_category.uid for automatic join
sql_kw['predicate_category.uid'] = '!=0'
sql_kw['predicate_category.uid'] = '!=NULL'
if len(category_list)==0:
category_list = ['NULL']
category_expression = portal_categories.buildSQLSelector(
category_list,
query_table='predicate_category')
query_table='predicate_category',
none_sql_value=0)
if len(where_expression) > 0:
where_expression = '(%s) AND \n(%s)' % \
(where_expression,category_expression)
......
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