Commit 00073647 authored by Alain Takoudjou's avatar Alain Takoudjou

Directly use WorkflowTool to access time value.

Mixed commit:

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