mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fix HouseholdACLAwareRepository: use the correct association to person's center
This commit is contained in:
parent
e2d62d5792
commit
2c83b4c912
@ -41,8 +41,9 @@ final readonly class HouseholdACLAwareRepository implements HouseholdACLAwareRep
|
||||
$qb
|
||||
->join($alias . '.members', 'members')
|
||||
->join('members.person', 'person')
|
||||
->join('person.centerCurrent', 'person_center_current')
|
||||
->andWhere(
|
||||
$qb->expr()->in('person.center', ':centers')
|
||||
$qb->expr()->in('person_center_current.center', ':centers')
|
||||
)
|
||||
->setParameter('centers', $centers);
|
||||
|
||||
|
@ -76,7 +76,8 @@ final class HouseholdApiControllerTest extends WebTestCase
|
||||
$em->persist($p);
|
||||
$h = new Household();
|
||||
$h->addMember($m = (new HouseholdMember())->setPerson($p));
|
||||
$h->addAddress(Address::createFromAddressReference($reference)->setValidFrom(new DateTime('today')));
|
||||
$h->addAddress($a = Address::createFromAddressReference($reference)->setValidFrom(new DateTime('today')));
|
||||
$em->persist($a);
|
||||
$em->persist($m);
|
||||
$em->persist($h);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user