Commit 6922aa33 authored by wenjie.zheng's avatar wenjie.zheng

Base.py: improve syntax.

parent 0ef9c86d
...@@ -510,7 +510,7 @@ def initializePortalTypeDynamicWorkflowMethods(ptype_klass, portal_workflow): ...@@ -510,7 +510,7 @@ def initializePortalTypeDynamicWorkflowMethods(ptype_klass, portal_workflow):
for wf in portal_workflow.getWorkflowsFor(portal_type): for wf in portal_workflow.getWorkflowsFor(portal_type):
wf_id = wf.getId() wf_id = wf.getId()
wf_type = wf.__class__.__name__ wf_type = wf.__class__.__name__
if wf_type == "DCWorkflowDefinition" or wf_type == "Workflow": if wf_type in ['DCWorkflowDefinition', 'Workflow']:
# Create state var accessor # Create state var accessor
# and generate methods that support the translation of workflow states # and generate methods that support the translation of workflow states
state_var = wf.getStateVariable() state_var = wf.getStateVariable()
...@@ -531,7 +531,7 @@ def initializePortalTypeDynamicWorkflowMethods(ptype_klass, portal_workflow): ...@@ -531,7 +531,7 @@ def initializePortalTypeDynamicWorkflowMethods(ptype_klass, portal_workflow):
storage = workflow_dict storage = workflow_dict
transitions = wf.getTransitionValueList() transitions = wf.getTransitionValueList()
elif wf_type == "InteractionWorkflowDefinition" or wf_type == "Interaction Workflow": elif wf_type in ['InteractionWorkflowDefinition', 'Interaction Workflow']:
storage = interaction_workflow_dict storage = interaction_workflow_dict
transitions = wf.getTransitionValueList() transitions = wf.getTransitionValueList()
else: else:
......
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