Commit 168801f0 authored by Jean-Baptiste Oellers's avatar Jean-Baptiste Oellers
Browse files

Présuppression des RecallException

parent 6d85b4bf
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ use Oscar\Entity\ActivityPerson;
use Oscar\Entity\OrganizationPerson;
use Oscar\Entity\Person;
use Oscar\Entity\ProjectMember;
use Oscar\Entity\RecallException;
use Oscar\Entity\TimeSheet;
use Oscar\Exception\OscarDeletePersonNotPossibleException;
use Oscar\Exception\OscarException;
@@ -47,6 +48,11 @@ class PersonDeleteService implements UseOscarUserContextService, UseEntityManage
            ->setParameter('person', $person);
        $del->getQuery()->execute();

        $del = $this->getEntityManager()->createQueryBuilder()->delete(RecallException::class, 'n')
            ->where('n.person = :person')
            ->setParameter('person', $person);
        $del->getQuery()->execute();

        $this->getEntityManager()->remove($person);
        $this->getEntityManager()->flush();
    }