update for new create_entity implementation stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 15 Oct 2009 18:34:20 +0200
branchstable
changeset 3687 859f7d741bfb
parent 3685 6f807804f1d0
child 3688 421fb447ecb2
update for new create_entity implementation
entities/wfobjs.py
--- a/entities/wfobjs.py	Thu Oct 15 15:28:10 2009 +0200
+++ b/entities/wfobjs.py	Thu Oct 15 18:34:20 2009 +0200
@@ -444,14 +444,11 @@
             kwargs['comment'] = comment
             if commentformat is not None:
                 kwargs['comment_format'] = commentformat
-        args = [('wf_info_for', 'E')]
-        kwargs['E'] = self.eid
+        kwargs['wf_info_for'] = self
         if treid is not None:
-            args.append( ('by_transition', 'T') )
-            kwargs['T'] = treid
+            kwargs['by_transition'] = self.req.entity_from_eid(treid)
         if tseid is not None:
-            args.append( ('to_state', 'S') )
-            kwargs['S'] = tseid
+            kwargs['to_state'] = self.req.entity_from_eid(tseid)
         return self.req.create_entity('TrInfo', *args, **kwargs)
 
     def fire_transition(self, tr, comment=None, commentformat=None):