Commit 06f0a59a authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

[Fix] verification des validations des acteurs directeurs avant validation de ceu-ci

parent 264c8395
Loading
Loading
Loading
Loading
+3 −0
Changes for module/Soutenance/src/Soutenance/Service/Validation/ValidationService.php: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -97,7 +97,9 @@ class ValidationService
    {
        // l'individu sera enregistré dans la validation pour faire le lien entre Utilisateur et Individu.
        $individu = $this->userContextService->getIdentityIndividu();
        $v = $this->getRepository()->findValidationByTheseAndCodeAndIndividu($these, TypeValidation::CODE_PROPOSITION_SOUTENANCE, $individu);

        if ($v === null) {
            $v = new Validation(
                $this->getTypeValidation(TypeValidation::CODE_PROPOSITION_SOUTENANCE),
                $these,
@@ -109,6 +111,7 @@ class ValidationService
            } catch (OptimisticLockException $e) {
                throw new RuntimeException("Erreur lors de l'enregistrement de la validation en bdd", null, $e);
            }
        }

        return $v;
    }