Commit 20ee9b58 authored by iv's avatar iv

ERP5Workflow: some refactoring on dc_workflow_asERP5Object

parent c33ac428
......@@ -86,7 +86,7 @@ for workflow in selected_workflow_list:\n
url_quote(\'workflow(s) is already exist.\')))\n
\n
# conversion and reassignment\n
new_workflow = context.dc_workflow_asERP5Object(context, workflow, temp=0)\n
new_workflow = context.dc_workflow_asERP5Object(workflow, is_temporary=False)\n
context.reassignWorkflow(new_workflow.getId())\n
selected_workflow_id_list.append(new_workflow.getId())\n
\n
......
......@@ -1014,14 +1014,14 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
workflow = workflow_tool._getOb(workflow_id)
if workflow.getPortalType() not in ['Workflow', 'Interaction Workflow', 'Configuration Workflow']:
LOG("### workflow id" , 0, workflow_id)
new_workflow = workflow_tool.dc_workflow_asERP5Object(workflow_tool, workflow, temp=0)
new_workflow = workflow_tool.dc_workflow_asERP5Object(workflow, is_temporary=False)
workflow_tool.reassignWorkflow(workflow_id)
self.commit()
LOG("### reassigned" , 0, workflow_id)
# force convert edit_workflow: Why have to load edit_workflow this way?
edit_workflow = workflow_tool._getOb('edit_workflow', None)
if edit_workflow is not None:
new_workflow = workflow_tool.dc_workflow_asERP5Object(workflow_tool, edit_workflow, temp=0)
new_workflow = workflow_tool.dc_workflow_asERP5Object(edit_workflow, is_temporary=False)
workflow_tool.reassignWorkflow('edit_workflow')
LOG("### edit workflow" , 0, "after reassignment")
self.commit()
......
This diff is collapsed.
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