Commit 2c52eb8d authored by Pierre-Yves David's avatar Pierre-Yves David
Browse files

improve error message for redundant initial workflow states

--HG--
branch : stable
parent 505025eb0d37
......@@ -101,7 +101,7 @@ class Workflow(AnyEntity):
self.req.execute('SET S state_of WF WHERE S eid %(s)s, WF eid %(wf)s',
{'s': state.eid, 'wf': self.eid}, ('s', 'wf'))
if initial:
assert not self.initial
assert not self.initial, "Initial state already defined as %s" % self.initial
self.req.execute('SET WF initial_state S '
'WHERE S eid %(s)s, WF eid %(wf)s',
{'s': state.eid, 'wf': self.eid}, ('s', 'wf'))
......
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