merge
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Thu, 24 Sep 2009 11:06:50 +0200
changeset 3461 8a11aeea4d25
parent 3460 e4843535db25 (current diff)
parent 3458 b7621175989a (diff)
child 3462 3a79fecdd2b4
merge
--- 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):