Commit e5563f87 authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Rafael Monnerat

Directly use WorkflowTool to access time value.

Mixed commit:

  43b1ae1bc46b453e4553a9bc1077fe86e5db13bb
  2f05fe1b585d3ca736538b32269d36a410f5f7da
parent 650aa628
......@@ -3249,11 +3249,12 @@ class Base(
pass
else:
max_date = None
for history in history_list.itervalues():
try:
date = history[-1]['time']
except (IndexError, KeyError, TypeError):
continue
portal_workflow = getToolByName(self.getPortalObject(), 'portal_workflow')
getStatusOf = portal_workflow.getStatusOf
for key, _ in history_list.iteritems():
status = getStatusOf(key, self)
if status is not None and status.has_key('time'):
date = status['time']
if date > max_date:
max_date = date
if max_date:
......
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