# HG changeset patch # User Sylvain Thénault # Date 1253727391 -7200 # Node ID 063488f14a0fac79f39af460483c566bfcfdef9f # Parent 4958622667852ff55e32a01318216a9149ab54ff no need to access to _ through entity.req... diff -r 495862266785 -r 063488f14a0f hooks/workflow.py --- a/hooks/workflow.py Wed Sep 23 19:26:38 2009 +0200 +++ b/hooks/workflow.py Wed Sep 23 19:36:31 2009 +0200 @@ -172,7 +172,7 @@ raise ValidationError(entity.eid, {'by_transition': msg}) deststate = wf.state_by_eid(deststateeid) if not cowpowers and deststate is None: - msg = entity.req._("state doesn't belong to entity's workflow") + msg = session._("state doesn't belong to entity's workflow") raise ValidationError(entity.eid, {'to_state': msg}) else: # check transition is valid and allowed, unless we're coming back from @@ -196,7 +196,7 @@ if swtr is None: deststate = session.entity_from_eid(deststateeid) if not cowpowers and deststate is None: - msg = entity.req._("state doesn't belong to entity's workflow") + msg = session._("state doesn't belong to entity's workflow") raise ValidationError(entity.eid, {'to_state': msg}) else: deststateeid = tr.destination().eid @@ -226,7 +226,7 @@ wftr = forentity.subworkflow_input_transition() if wftr is None: # inconsistency detected - msg = entity.req._("state doesn't belong to entity's current workflow") + msg = session._("state doesn't belong to entity's current workflow") raise ValidationError(entity.eid, {'to_state': msg}) tostate = wftr.get_exit_point(entity['to_state']) if tostate is not None: