Commit 22953588 authored by wenjie.zheng's avatar wenjie.zheng

Workflow.py: fix functions getCatalogVariablesFor, getCurrentStatusDict accordin

g to erp5 workflow structure.
parent 01871a04
......@@ -159,10 +159,11 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
Get the current status dict.
"""
workflow_key = self._generateHistoryKey()
workflow_history = self.getHistoryOf(workflow_key, document)
# Copy is requested
result = document.workflow_history[workflow_key][-1].copy()
return result
if workflow_history:
return workflow_history[-1].copy()
return None
def getDateTime(self):
"""
......
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