[Erp5-report] r23562 - /erp5/trunk/products/ERP5Catalog/CatalogTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Sep 11 13:59:05 CEST 2008


Author: jerome
Date: Thu Sep 11 13:59:01 2008
New Revision: 23562

URL: http://svn.erp5.org?rev=23562&view=rev
Log:
define a __repr__ method on IndexableObjectWrapper containing the path of the wrapped object, otherwise logs like """uid of <Products.ERP5Catalog.CatalogTool.IndexableObjectWrapper object at 0x7a1b210> changed from 19195L to 19191L as old one is assigned to /erp5/organisation_module/27 in catalog !!! This can be fatal. You should reindex the whole site immediately.""" are not usefull.


Modified:
    erp5/trunk/products/ERP5Catalog/CatalogTool.py

Modified: erp5/trunk/products/ERP5Catalog/CatalogTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Catalog/CatalogTool.py?rev=23562&r1=23561&r2=23562&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Catalog/CatalogTool.py (original)
+++ erp5/trunk/products/ERP5Catalog/CatalogTool.py Thu Sep 11 13:59:01 2008
@@ -165,6 +165,10 @@
               add(prefix)
               add(prefix + ':' + role)
         return list(allowed)
+
+    def __repr__(self):
+      return '<Products.ERP5Catalog.CatalogTool.IndexableObjectWrapper'\
+          ' for %s>' % ('/'.join(self.__ob.getPhysicalPath()), )
 
 
 class RelatedBaseCategory(Method):




More information about the Erp5-report mailing list