equal
deleted
inserted
replaced
518 if tr is None: |
518 if tr is None: |
519 msg = session._("transition doesn't belong to entity's workflow") |
519 msg = session._("transition doesn't belong to entity's workflow") |
520 raise ValidationError(entity.eid, {'by_transition': msg}) |
520 raise ValidationError(entity.eid, {'by_transition': msg}) |
521 if not tr.has_input_state(fromstate): |
521 if not tr.has_input_state(fromstate): |
522 msg = session._("transition isn't allowed") |
522 msg = session._("transition isn't allowed") |
523 print tr.name, fromstate.name, entity.by_transition |
|
524 raise ValidationError(entity.eid, {'by_transition': msg}) |
523 raise ValidationError(entity.eid, {'by_transition': msg}) |
525 if not tr.may_be_fired(foreid): |
524 if not tr.may_be_fired(foreid): |
526 msg = session._("transition may not be fired") |
525 msg = session._("transition may not be fired") |
527 raise ValidationError(entity.eid, {'by_transition': msg}) |
526 raise ValidationError(entity.eid, {'by_transition': msg}) |
528 if entity.get('to_state'): |
527 if entity.get('to_state'): |