From 92753604facc604b3de03d9616041dbdbaceb409 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Wed, 24 Nov 2021 17:00:09 +0100 Subject: [PATCH] fix backend error in activity::getPersonsNotAssociated() --- src/Bundle/ChillActivityBundle/Entity/Activity.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillActivityBundle/Entity/Activity.php b/src/Bundle/ChillActivityBundle/Entity/Activity.php index 85abed5e5..693e2af85 100644 --- a/src/Bundle/ChillActivityBundle/Entity/Activity.php +++ b/src/Bundle/ChillActivityBundle/Entity/Activity.php @@ -346,8 +346,9 @@ class Activity implements HasCenterInterface, HasScopeInterface, AccompanyingPer if (null !== $this->accompanyingPeriod) { $personsNotAssociated = []; + // TODO better semantic with: return $this->persons->filter(...); foreach ($this->persons as $person) { - if (!in_array($person, $this->getPersonsAssociated())) { + if ($this->accompanyingPeriod->getOpenParticipationContainsPerson($person) === null) { $personsNotAssociated[] = $person; } }