mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
Fix serialization of accompangying period work referrers
This commit is contained in:
@@ -392,9 +392,13 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
|
||||
*/
|
||||
public function getReferrers(): ReadableCollection
|
||||
{
|
||||
return $this->referrersHistory
|
||||
$users = $this->referrersHistory
|
||||
->filter(fn (AccompanyingPeriodWorkReferrerHistory $h) => null === $h->getEndDate())
|
||||
->map(fn (AccompanyingPeriodWorkReferrerHistory $h) => $h->getUser());
|
||||
->map(fn (AccompanyingPeriodWorkReferrerHistory $h) => $h->getUser())
|
||||
->getValues()
|
||||
;
|
||||
|
||||
return new ArrayCollection(array_values($users));
|
||||
}
|
||||
|
||||
public function getReferrersHistory(): Collection
|
||||
|
Reference in New Issue
Block a user