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