ensure relation is properly created stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 07 Oct 2009 20:03:24 +0200
branchstable
changeset 3609 9329f765fff3
parent 3608 5a46e68c3d3c
child 3610 312349b3712e
ensure relation is properly created
entities/wfobjs.py
--- a/entities/wfobjs.py	Wed Oct 07 19:59:46 2009 +0200
+++ b/entities/wfobjs.py	Wed Oct 07 20:03:24 2009 +0200
@@ -143,8 +143,8 @@
                                   requiredgroups, conditions, **kwargs)
         if hasattr(subworkflow, 'eid'):
             subworkflow = subworkflow.eid
-        self.req.execute('SET T subworkflow WF WHERE WF eid %(wf)s,T eid %(t)s',
-                         {'t': tr.eid, 'wf': subworkflow}, ('wf', 't'))
+        assert self.req.execute('SET T subworkflow WF WHERE WF eid %(wf)s,T eid %(t)s',
+                                {'t': tr.eid, 'wf': subworkflow}, ('wf', 't'))
         for fromstate, tostate in exitpoints:
             tr.add_exit_point(fromstate, tostate)
         return tr