Commit d844e9af authored by iv's avatar iv

ERP5Workflow: PERF: change getTransitions to an alias, remove unused variable

parent b40fe901
......@@ -127,9 +127,7 @@ class State(IdAsReferenceMixin("state_", "prefix"), XMLObject, CustomStorageMatr
return [parent._getOb(destination_id) for destination_id in
self.getDestinationIdList()]
def getTransitions(self):
# return possible transition id list:
return self.getDestinationIdList()
getTransitions = getDestinationIdList
security.declareProtected(Permissions.AccessContentsInformation,
'setStatePermissionRolesDict')
......
......@@ -265,14 +265,12 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
Workflow Tool to get temporarilly converted DCWorkflow.
"""
temp_workflow_list = []
temp_workflow_id_list = []
for dc_workflow in self.getPortalObject().portal_workflow.objectValues():
workflow_type = dc_workflow.__class__.__name__
if workflow_type in ['Workflow', 'Interaction Workflow', 'Configuration Workflow']:
continue
temp_workflow = self.dc_workflow_asERP5Object(dc_workflow, is_temporary=temp_obj)
temp_workflow_list.append(temp_workflow)
temp_workflow_id_list.append(temp_workflow.getTitle())
return temp_workflow_list
def getScriptPathList(self, workflow, initial_script_name_list):
......
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