mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
only prefill agents traitants of action if parcours has a referrer, otherwise null
This commit is contained in:
@@ -26,8 +26,9 @@ class AccompanyingPeriodWorkEventListener
|
||||
|
||||
public function prePersistAccompanyingPeriodWork(AccompanyingPeriodWork $work): void
|
||||
{
|
||||
if ($this->security->getUser() instanceof User) {
|
||||
$work->addReferrer($this->security->getUser());
|
||||
$referrer = $work->getAccompanyingPeriod()->getUser();
|
||||
if (null !== $referrer) {
|
||||
$work->addReferrer($referrer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user