equal
deleted
inserted
replaced
190 |
190 |
191 def change_state(self, stateeid, trcomment=None, trcommentformat=None): |
191 def change_state(self, stateeid, trcomment=None, trcommentformat=None): |
192 """change the entity's state according to a state defined in given |
192 """change the entity's state according to a state defined in given |
193 parameters |
193 parameters |
194 """ |
194 """ |
|
195 assert not isinstance(stateeid, basestring), 'change_state wants a state eid' |
195 if trcomment: |
196 if trcomment: |
196 self.req.set_shared_data('trcomment', trcomment) |
197 self.req.set_shared_data('trcomment', trcomment) |
197 if trcommentformat: |
198 if trcommentformat: |
198 self.req.set_shared_data('trcommentformat', trcommentformat) |
199 self.req.set_shared_data('trcommentformat', trcommentformat) |
199 self.req.execute('SET X in_state S WHERE X eid %(x)s, S eid %(s)s', |
200 self.req.execute('SET X in_state S WHERE X eid %(x)s, S eid %(s)s', |