From 942537aca33c9974070ae3c9d4298d6e00c903b6 Mon Sep 17 00:00:00 2001 From: Christophe Dumez <christophe@nexedi.com> Date: Thu, 10 Aug 2006 15:56:35 +0000 Subject: [PATCH] - Removed some unneeded code - Added a way to do exact search using "=pattern" git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9138 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ZSQLCatalog/SQLCatalog.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/product/ZSQLCatalog/SQLCatalog.py b/product/ZSQLCatalog/SQLCatalog.py index eb9a4ba0fe..ea0ab6e380 100644 --- a/product/ZSQLCatalog/SQLCatalog.py +++ b/product/ZSQLCatalog/SQLCatalog.py @@ -1583,12 +1583,10 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base): # For security. value = self._quoteSQLString(value) if value != '' or not ignore_empty_string: - # we consider empty string as Non Significant - if value == '=': - # But we consider the sign = as empty string - value='' if '%' in value: where_expression += ["%s LIKE '%s'" % (key, value)] + elif value.startswith('='): + where_expression += ["%s = '%s'" % (key, value[1:])] elif value.startswith('>='): where_expression += ["%s >= '%s'" % (key, value[2:])] elif value.startswith('<='): -- 2.30.9