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; } }