Commit 3dcdb2ed authored by Alexandre Boeglin's avatar Alexandre Boeglin

Fixed complicated list index.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3304 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 36d07429
...@@ -38,7 +38,7 @@ def setWorkflowVariable(self, object, workflow_id='edit_workflow',**kw): ...@@ -38,7 +38,7 @@ def setWorkflowVariable(self, object, workflow_id='edit_workflow',**kw):
workflow_history = object.workflow_history workflow_history = object.workflow_history
for workflow in workflow_history.keys(): for workflow in workflow_history.keys():
if len(workflow_history[workflow])!= 0 and workflow==workflow_id: if len(workflow_history[workflow])!= 0 and workflow==workflow_id:
last_status = workflow_history[workflow][len(workflow_history[workflow])-1] last_status = workflow_history[workflow][-1]
for variable in kw.keys(): for variable in kw.keys():
if last_status.has_key(variable): if last_status.has_key(variable):
last_status[variable]=kw[variable] last_status[variable]=kw[variable]
......
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