equal
deleted
inserted
replaced
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', |