mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-07-01 14:36:13 +00:00
do not add referrer if user is null
This commit is contained in:
parent
ae5940eb48
commit
efeda81e05
@ -25,6 +25,8 @@ class AccompanyingPeriodWorkEventListener
|
|||||||
|
|
||||||
public function prePersistAccompanyingPeriodWork(AccompanyingPeriodWork $work): void
|
public function prePersistAccompanyingPeriodWork(AccompanyingPeriodWork $work): void
|
||||||
{
|
{
|
||||||
$work->addReferrer($this->security->getUser());
|
if (null !== $this->security->getUser()) {
|
||||||
|
$work->addReferrer($this->security->getUser());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user