allow actions also in previous work items of a run

This commit is contained in:
Helmut Merz 2014-05-03 10:44:47 +02:00
parent cacca105ac
commit 94463df4d5

View file

@ -225,8 +225,8 @@ class WorkItem(Stateful, Track):
return list(getParent(self).query(runId=self.runId))
def doAction(self, action, userName, **kw):
if self != self.currentWorkItems[-1]:
raise ValueError("Actions are only allowed on the last item of a run.")
#if self != self.currentWorkItems[-1]:
# raise ValueError("Actions are only allowed on the last item of a run.")
if action not in [t.name for t in self.getAvailableTransitions()]:
raise ValueError("Action '%s' not allowed in state '%s'" %
(action, self.state))