server/hooks.py
branchstable
changeset 3628 440931181322
parent 3618 ad04840ab25c
child 3662 9eeadad82d93
equal deleted inserted replaced
3627:70dbba754c11 3628:440931181322
   557         wftr = forentity.subworkflow_input_transition()
   557         wftr = forentity.subworkflow_input_transition()
   558         if wftr is None:
   558         if wftr is None:
   559             # inconsistency detected
   559             # inconsistency detected
   560             msg = entity.req._("state doesn't belong to entity's current workflow")
   560             msg = entity.req._("state doesn't belong to entity's current workflow")
   561             raise ValidationError(entity.eid, {'to_state': msg})
   561             raise ValidationError(entity.eid, {'to_state': msg})
   562         tostate = wftr.get_exit_point(entity['to_state'])
   562         tostate = wftr.get_exit_point(forentity, entity['to_state'])
   563         if tostate is not None:
   563         if tostate is not None:
   564             # reached an exit point
   564             # reached an exit point
   565             msg = session._('exiting from subworkflow %s')
   565             msg = session._('exiting from subworkflow %s')
   566             msg %= session._(forentity.current_workflow.name)
   566             msg %= session._(forentity.current_workflow.name)
   567             session.transaction_data[(forentity.eid, 'subwfentrytr')] = True
   567             session.transaction_data[(forentity.eid, 'subwfentrytr')] = True