Commit 2f05fe1b authored by Łukasz Nowak's avatar Łukasz Nowak

Avoid walking the whole workflow history.

parent 834d4502
...@@ -3171,7 +3171,9 @@ class Base( CopyContainer, ...@@ -3171,7 +3171,9 @@ class Base( CopyContainer,
history = wf.getInfoFor(self, 'history', None) history = wf.getInfoFor(self, 'history', None)
except KeyError: except KeyError:
history = None history = None
if history is not None and len(history): # as WorkflowHistoryList.__len__ implementation has to walk whole
# workflow check that there is something in history in simpler way
if isinstance(history, list) and history:
date = history[-1].get('time', None) date = history[-1].get('time', None)
# Then get the last line of edit_workflow # Then get the last line of edit_workflow
if date > max_date: if date > 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