fix backend error in activity::getPersonsNotAssociated()

This commit is contained in:
Mathieu Jaumotte 2021-11-24 17:00:09 +01:00
parent 95e306ccd6
commit 92753604fa

View File

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