Commit 2d890891 authored by wenjie.zheng's avatar wenjie.zheng

Workflow.py: check if object type is definded in portal_types, if not, do not...

Workflow.py: check if object type is definded in portal_types, if not, do not execute gerTypeWorkflowList for this object.
parent 5209ef4c
...@@ -372,9 +372,9 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject): ...@@ -372,9 +372,9 @@ 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:
for workflow_id in info.object.getTypeInfo().getTypeWorkflowList(): for workflow_id in info.object.getTypeInfo().getTypeWorkflowList():
append(info.object.getTypeInfo().getId()) append(info.object.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