This commit is contained in:
Julien Fastré 2022-06-16 15:37:59 +02:00
parent da9eba2618
commit dfb583fa8b
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,6 @@ declare(strict_types=1);
namespace Chill\PersonBundle\EventListener;
use Chill\MainBundle\Entity\User;
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork;
use Symfony\Component\Security\Core\Security;
@ -27,6 +26,7 @@ class AccompanyingPeriodWorkEventListener
public function prePersistAccompanyingPeriodWork(AccompanyingPeriodWork $work): void
{
$referrer = $work->getAccompanyingPeriod()->getUser();
if (null !== $referrer) {
$work->addReferrer($referrer);
}