entities/wfobjs.py
branchstable
changeset 3687 859f7d741bfb
parent 3663 c74d8ec4cdb2
child 3695 4dd26ca635ed
child 3696 e0d53bb59611
--- 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):