Commit 16c712f2 authored by wenjie.zheng's avatar wenjie.zheng

Workflow.py: resolve error when adding gadget at access tab.

parent 99004f61
...@@ -355,9 +355,11 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject): ...@@ -355,9 +355,11 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
workflow_tool = portal.portal_workflow workflow_tool = portal.portal_workflow
result = [] result = []
append = result.append append = result.append
if info.object.getTypeInfo() is not None: document = info.object
for workflow_id in info.object.getTypeInfo().getTypeWorkflowList(): if document is not None:
append(info.object.getTypeInfo().getId()) if document.getTypeInfo() is not None:
for workflow_id in document.getTypeInfo().getTypeWorkflowList():
append(document.getTypeInfo().getId())
return result return result
portal_type_list = getPortalTypeListForWorkflow(self.id) portal_type_list = getPortalTypeListForWorkflow(self.id)
......
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