--- a/entities/wfobjs.py Thu Sep 24 00:24:21 2009 +0200
+++ b/entities/wfobjs.py Thu Sep 24 11:06:50 2009 +0200
@@ -452,7 +452,9 @@
"""
assert self.current_workflow
tr = self.current_workflow.transition_by_name(trname)
- assert tr is not None, 'not a %s transition: %s' % (self.__regid__, trname)
+ if tr is None:
+ raise WorkflowException('not a %s transition: %s' % (self.__regid__,
+ trname))
return self._add_trinfo(comment, commentformat, tr.eid)
def change_state(self, statename, comment=None, commentformat=None, tr=None):