Export: fix infinite loop in HouseholdVoter

This commit is contained in:
Julien Fastré 2023-11-13 15:27:07 +01:00
parent 1663c6f7c7
commit 2e60ba3137
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,5 @@
kind: Fixed
body: 'Export: Fix failure in export linked to household'
time: 2023-11-13T15:26:21.891117274+01:00
custom:
Issue: "189"

View File

@ -78,7 +78,7 @@ class HouseholdVoter extends Voter implements ProvideRoleHierarchyInterface, Chi
return match ($attribute) { return match ($attribute) {
self::SEE => $this->checkAssociatedMembersRole($subject, PersonVoter::SEE), self::SEE => $this->checkAssociatedMembersRole($subject, PersonVoter::SEE),
self::EDIT => $this->checkAssociatedMembersRole($subject, PersonVoter::UPDATE), self::EDIT => $this->checkAssociatedMembersRole($subject, PersonVoter::UPDATE),
self::STATS => $this->voteOnAttribute($attribute, $subject, $token), self::STATS => $this->helper->voteOnAttribute($attribute, $subject, $token),
default => throw new \UnexpectedValueException('attribute not supported'), default => throw new \UnexpectedValueException('attribute not supported'),
}; };
} }