[Erp5-report] r42761 nicolas.dumazet - /erp5/trunk/products/ERP5/Interactor/
nobody at svn.erp5.org
nobody at svn.erp5.org
Sat Jan 29 10:07:15 CET 2011
Author: nicolas.dumazet
Date: Sat Jan 29 10:07:14 2011
New Revision: 42761
URL: http://svn.erp5.org?rev=42761&view=rev
Log:
we have no guarantees that method_call_object can help us find the portal
Modified:
erp5/trunk/products/ERP5/Interactor/PortalTypeClassInteractor.py
Modified: erp5/trunk/products/ERP5/Interactor/PortalTypeClassInteractor.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Interactor/PortalTypeClassInteractor.py?rev=42761&r1=42760&r2=42761&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Interactor/PortalTypeClassInteractor.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Interactor/PortalTypeClassInteractor.py [utf8] Sat Jan 29 10:07:14 2011
@@ -54,7 +54,10 @@ class PortalTypeClassInteractor(Interact
"""
Call resetDynamicDocuments
"""
- portal = method_call_object.instance.getPortalObject()
+ from Products.ERP5.ERP5Site import getSite
+ # method_call_object might be an unwrapped DCWorflowDefinition method,
+ # no even belonging to a container.
+ portal = getSite()
types_tool = getattr(portal, 'portal_types', None)
if types_tool is not None:
types_tool.resetDynamicDocuments()
More information about the Erp5-report
mailing list