diff --git a/product/ERP5/Document/Predicate.py b/product/ERP5/Document/Predicate.py index 6237fc7513cd3dbfe221b69137005685b396e98b..89d91de38de05063849aec64d6fa1c2e17afc187 100644 --- a/product/ERP5/Document/Predicate.py +++ b/product/ERP5/Document/Predicate.py @@ -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):