[Erp5-report] r27663 - /erp5/trunk/products/ZSQLCatalog/SearchKey/DefaultKey.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Jun 18 17:12:22 CEST 2009


Author: vincent
Date: Thu Jun 18 17:12:21 2009
New Revision: 27663

URL: http://svn.erp5.org?rev=27663&view=rev
Log:
Fix unneeded leading ':' in search text expressions rendered from a DefaultKey Query when column is ''.

Modified:
    erp5/trunk/products/ZSQLCatalog/SearchKey/DefaultKey.py

Modified: erp5/trunk/products/ZSQLCatalog/SearchKey/DefaultKey.py
URL: http://svn.erp5.org/erp5/trunk/products/ZSQLCatalog/SearchKey/DefaultKey.py?rev=27663&r1=27662&r2=27663&view=diff
==============================================================================
--- erp5/trunk/products/ZSQLCatalog/SearchKey/DefaultKey.py [utf8] (original)
+++ erp5/trunk/products/ZSQLCatalog/SearchKey/DefaultKey.py [utf8] Thu Jun 18 17:12:21 2009
@@ -59,7 +59,9 @@
     if operator_text == 'like':
       assert isinstance(value, basestring)
       assert '%' in value
-      result = '%s:%s' % (column, value)
+      result = value
+      if len(column):
+        result = '%s:%s' % (column, result)
     else:
       result = SearchKey.buildSearchTextExpression(self, operator, value, column=column)
     return result




More information about the Erp5-report mailing list