From f1f629c80dd142cf4d4501beb868df9aec06dc5e Mon Sep 17 00:00:00 2001
From: Sebastien Robin <seb@nexedi.com>
Date: Fri, 12 Jan 2007 09:50:46 +0000
Subject: [PATCH] the where_expression parameter was not always taken into
 account

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12038 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ZSQLCatalog/SQLCatalog.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/product/ZSQLCatalog/SQLCatalog.py b/product/ZSQLCatalog/SQLCatalog.py
index 16ee5a038f..0d6c8b7bfb 100644
--- a/product/ZSQLCatalog/SQLCatalog.py
+++ b/product/ZSQLCatalog/SQLCatalog.py
@@ -1916,7 +1916,7 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base):
         where_expression_list.append(related_method(**table_id))
     # Concatenate expressions
     if kw.get('where_expression',None) is not None:
-      if len(where_expression) > 0:
+      if len(kw['where_expression']) > 0:
         where_expression_list.append(kw['where_expression'])
     where_expression = join(where_expression_list, ' AND ')
     select_expression= join(select_expression_list,',')
-- 
2.30.9