Commit 9eff1120 authored by Sebastien Robin's avatar Sebastien Robin

join with the predicate_category table only when it is necassary, this should...

join with the predicate_category table only when it is necassary, this should fix many problems when expanding the simulation

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19651 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0626089c
......@@ -148,6 +148,8 @@ class DomainTool(BaseTool):
context.getCategoryMembershipList(tested_base_category, base=1))
if tested_base_category_list != []:
# Add predicate_category.uid for automatic join
sql_kw['predicate_category.uid'] = '!=0'
if len(category_list)==0:
category_list = ['NULL']
category_expression = portal_categories.buildSQLSelector(
......@@ -160,8 +162,6 @@ class DomainTool(BaseTool):
where_expression = category_expression
sql_kw['where_expression'] = where_expression
# Add predicate_category.uid for automatic join
sql_kw['predicate_category.uid'] = '!=0'
kw.update(sql_kw)
# LOG('searchPredicateList, kw',0,kw)
......
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