Commit 8e59bbb5 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Ajout d'un message pour prévenir que l'établissement courant n'est pas bien configuré

parent ccf6504c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -252,6 +252,9 @@ class ServiceService extends AbstractEntityService

            if (!$entity->getEtablissement()) {
                $entity->setEtablissement($this->getServiceContext()->getEtablissement());
                if (!$entity->getEtablissement()){
                    throw new \LogicException('L\'établissement n\'est pas renseigné dans les paramétrages généraux de OSE');
                }
            }
            if (!$entity->getIntervenant() && $intervenant = $role->getIntervenant()) {
                $entity->setIntervenant($intervenant);