Commit c6f97e88 authored by Nicolas Dumazet's avatar Nicolas Dumazet

we have no guarantees that method_call_object can help us find the portal


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42761 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e4ef9ae6
......@@ -54,7 +54,10 @@ class PortalTypeClassInteractor(Interactor):
"""
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()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment