[Household - list members during membership] avoid to show two membersship with the same person

This commit is contained in:
Julien Fastré 2022-02-24 09:45:46 +01:00
parent 8f597eb254
commit e46220ff72
2 changed files with 2 additions and 1 deletions

View File

@ -11,6 +11,7 @@ and this project adheres to
## Unreleased
<!-- write down unreleased development here -->
* [Person/Household list] when listing other simultaneous members of an household, exclude the members on person, not on members (avoid to show two membersship with the same person)
## Test releases

View File

@ -358,7 +358,7 @@ class Household
$membership->getEndDate()
)->filter(
static function (HouseholdMember $m) use ($membership) {
return $m !== $membership;
return $m->getPerson() !== $membership->getPerson();
}
);
}