[Erp5-report] r42983 nicolas.dumazet - /erp5/trunk/products/ERP5Type/Tool/BaseTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Feb 3 14:22:19 CET 2011
Author: nicolas.dumazet
Date: Thu Feb 3 14:22:19 2011
New Revision: 42983
URL: http://svn.erp5.org?rev=42983&view=rev
Log:
if this happens during BT installation, we have no guarantee that the object is
wrapped. Use the handy mighty getSite() instead.
Modified:
erp5/trunk/products/ERP5Type/Tool/BaseTool.py
Modified: erp5/trunk/products/ERP5Type/Tool/BaseTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Tool/BaseTool.py?rev=42983&r1=42982&r2=42983&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Tool/BaseTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Tool/BaseTool.py [utf8] Thu Feb 3 14:22:19 2011
@@ -82,7 +82,8 @@ class BaseTool (UniqueObject, Folder):
# type_class, or sometimes have no type definitions at all.
# Check that everything is alright before trying
# to migrate the tool:
- types_tool = self.getPortalObject().portal_types
+ from Products.ERP5.ERP5Site import getSite
+ types_tool = getSite().portal_types
type_definition = getattr(types_tool, portal_type, None)
if type_definition is None:
LOG('BaseTool._migrateToPortalTypeClass', WARNING,
More information about the Erp5-report
mailing list