Commit c419538b authored by wenjie.zheng's avatar wenjie.zheng

Workflow.py: fix getPortalTypeListForWorkflow.

parent 08b88b0d
......@@ -345,11 +345,10 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
workflow_tool = portal.portal_workflow
result = []
append = result.append
document = info.object
if document is not None:
if document.getTypeInfo() is not None:
for workflow_id in document.getTypeInfo().getTypeWorkflowList():
append(document.getPortalType())
for type_info in portal.portal_types.listTypeInfo():
portal_type = type_info.id
if workflow_id in type_info.getTypeWorkflowList():
append(portal_type)
return result
_getPortalTypeListForWorkflow = CachingMethod(getPortalTypeListForWorkflow,
......
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