equal
deleted
inserted
replaced
210 deststateeid = entity.get('to_state') |
210 deststateeid = entity.get('to_state') |
211 if not deststateeid: |
211 if not deststateeid: |
212 msg = session._('mandatory relation') |
212 msg = session._('mandatory relation') |
213 raise ValidationError(entity.eid, {'by_transition': msg}) |
213 raise ValidationError(entity.eid, {'by_transition': msg}) |
214 deststate = wf.state_by_eid(deststateeid) |
214 deststate = wf.state_by_eid(deststateeid) |
215 if not cowpowers and deststate is None: |
215 if deststate is None: |
216 msg = session._("state doesn't belong to entity's workflow") |
216 msg = session._("state doesn't belong to entity's workflow") |
217 raise ValidationError(entity.eid, {'to_state': msg}) |
217 raise ValidationError(entity.eid, {'to_state': msg}) |
218 else: |
218 else: |
219 # check transition is valid and allowed, unless we're coming back from |
219 # check transition is valid and allowed, unless we're coming back from |
220 # subworkflow |
220 # subworkflow |