Skip to content
Snippets Groups Projects
Commit ff6e3a72 authored by Dominik Pilár's avatar Dominik Pilár
Browse files

Merge branch...

Merge branch '41-event-level-completed-is-not-audited-when-the-last-phase-is-info-phase' into 'master'

Obtain the training run with phase to audit phase completed action.

Closes #41

See merge request !39
parents 5674b657 f921e818
No related branches found
No related tags found
1 merge request!39Obtain the training run with phase to audit phase completed action.
Pipeline #82935 passed with stages
in 2 minutes and 59 seconds
......@@ -567,7 +567,7 @@ public class TrainingRunService {
* @throws EntityNotFoundException training run is not found.
*/
public void finishTrainingRun(Long trainingRunId) {
TrainingRun trainingRun = findById(trainingRunId);
TrainingRun trainingRun = findByIdWithPhase(trainingRunId);
int maxOrder = abstractPhaseRepository.getCurrentMaxOrder(trainingRun.getCurrentPhase().getTrainingDefinition().getId());
if (trainingRun.getCurrentPhase().getOrder() != maxOrder) {
throw new EntityConflictException(new EntityErrorDetail(TrainingRun.class, "id", trainingRunId.getClass(), trainingRunId,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment