do not add referrer if user is null

This commit is contained in:
Julien Fastré 2022-03-21 15:17:33 +01:00
parent ae5940eb48
commit efeda81e05

View File

@ -25,6 +25,8 @@ class AccompanyingPeriodWorkEventListener
public function prePersistAccompanyingPeriodWork(AccompanyingPeriodWork $work): void
{
if (null !== $this->security->getUser()) {
$work->addReferrer($this->security->getUser());
}
}
}