Commit 2e24884f authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

do not call SQLQuery() if where_expression is empty.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28398 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f25a7e70
No related merge requests found
......@@ -288,7 +288,10 @@ class Predicate(XMLObject, Folder):
multimembership_select_list)
# Now merge identity and membership criteria
catalog_kw['where_expression'] = SQLQuery(sql_text)
if len(sql_text):
catalog_kw['where_expression'] = SQLQuery(sql_text)
else:
catalog_kw['where_expression'] = ''
sql_query = portal_catalog.buildSQLQuery(**catalog_kw)
for alias, table in sql_query['from_table_list']:
if from_table_dict.has_key(alias):
......
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