server/migractions.py
changeset 2680 66472d85d548
parent 2617 89c62b855f2e
child 2700 ecf888c8a250
equal deleted inserted replaced
2679:3fa8c0cec760 2680:66472d85d548
   912         if commit:
   912         if commit:
   913             self.commit()
   913             self.commit()
   914 
   914 
   915     def cmd_set_state(self, eid, statename, commit=False):
   915     def cmd_set_state(self, eid, statename, commit=False):
   916         self.session.set_pool() # ensure pool is set
   916         self.session.set_pool() # ensure pool is set
   917         entity = self.session.eid_rset(eid).get_entity(0, 0)
   917         entity = self.session.entity_from_eid(eid)
   918         entity.change_state(entity.wf_state(statename).eid)
   918         entity.change_state(entity.wf_state(statename).eid)
   919         if commit:
   919         if commit:
   920             self.commit()
   920             self.commit()
   921 
   921 
   922     # CWProperty handling ######################################################
   922     # CWProperty handling ######################################################