common/mixins.py
branchtls-sprint
changeset 1263 01152fffd593
parent 1182 78e4080252be
parent 1124 5548b608b7d9
child 1266 5f16f45e9bae
equal deleted inserted replaced
1246:76b3cd5d4f31 1263:01152fffd593
   191 
   191 
   192     def change_state(self, stateeid, trcomment=None, trcommentformat=None):
   192     def change_state(self, stateeid, trcomment=None, trcommentformat=None):
   193         """change the entity's state according to a state defined in given
   193         """change the entity's state according to a state defined in given
   194         parameters
   194         parameters
   195         """
   195         """
       
   196         assert not isinstance(stateeid, basestring), 'change_state wants a state eid'
   196         if trcomment:
   197         if trcomment:
   197             self.req.set_shared_data('trcomment', trcomment)
   198             self.req.set_shared_data('trcomment', trcomment)
   198         if trcommentformat:
   199         if trcommentformat:
   199             self.req.set_shared_data('trcommentformat', trcommentformat)
   200             self.req.set_shared_data('trcommentformat', trcommentformat)
   200         self.req.execute('SET X in_state S WHERE X eid %(x)s, S eid %(s)s',
   201         self.req.execute('SET X in_state S WHERE X eid %(x)s, S eid %(s)s',