common/mixins.py
branchtls-sprint
changeset 1266 5f16f45e9bae
parent 1263 01152fffd593
child 1267 ea03cdbc9f2e
--- a/common/mixins.py	Tue Apr 07 17:18:54 2009 +0200
+++ b/common/mixins.py	Tue Apr 07 17:19:13 2009 +0200
@@ -10,6 +10,7 @@
 from logilab.common.deprecation import obsolete
 from logilab.common.decorators import cached
 
+from cubicweb import typed_eid
 from cubicweb.selectors import implements
 from cubicweb.interfaces import IWorkflowable, IEmailable, ITree
 
@@ -226,7 +227,8 @@
         parameters, used to be called using __method controler facility
         """
         params = params or self.req.form
-        self.change_state(int(params.pop('state')), params.get('trcomment'),
+        self.change_state(typed_eid(params.pop('state')),
+                          params.get('trcomment'),
                           params.get('trcommentformat'))
         self.req.set_message(self.req._('__msg state changed'))