Commit 9be8fc28 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Fix an infinite recursion problem.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12010 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 54a6daa7
...@@ -233,14 +233,14 @@ def initializePortalTypeDynamicProperties(self, klass, ptype): ...@@ -233,14 +233,14 @@ def initializePortalTypeDynamicProperties(self, klass, ptype):
Base.aq_portal_type[ptype] = prop_holder Base.aq_portal_type[ptype] = prop_holder
def initializePortalTypeDynamicWorkflowMethods(self, klass, prop_holder): def initializePortalTypeDynamicWorkflowMethods(self, klass, prop_holder):
# We should now make sure workflow methods are defined """We should now make sure workflow methods are defined
# and also make sure simulation state is defined and also make sure simulation state is defined."""
portal_workflow = getToolByName(self, 'portal_workflow') # aq_inner is required to prevent extra name lookups from happening
# LOG('getWorkflowsFor', 0, # infinitely. For instance, if a workflow is missing, and the acquisition
# str((self, [wf.id for wf in portal_workflow.getWorkflowsFor(self)]))) # wrapper contains an object with _aq_dynamic defined, the workflow id
# is looked up with _aq_dynamic, thus causes infinite recursions.
portal_workflow = aq_inner(getToolByName(self, 'portal_workflow'))
for wf in portal_workflow.getWorkflowsFor(self): for wf in portal_workflow.getWorkflowsFor(self):
# LOG('in aq_portal_type %s' % id, 0,
# "found state workflow %s" % wf.id)
if wf.__class__.__name__ in ('DCWorkflowDefinition', ): if wf.__class__.__name__ in ('DCWorkflowDefinition', ):
wf_id = wf.id wf_id = wf.id
# Create state var accessor # Create state var accessor
......
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