mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
PersonJsonNormalizer: fix circular reference with residential address
This commit is contained in:
parent
1e146f542e
commit
a7240e8cc6
@ -197,7 +197,7 @@ class PersonJsonNormalizer implements DenormalizerAwareInterface, NormalizerAwar
|
|||||||
'age' => $this->normalizer->normalize($person->getAge(), $format, $context),
|
'age' => $this->normalizer->normalize($person->getAge(), $format, $context),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (in_array("minimal", $groups) && 1 === count($context)) {
|
if (in_array("minimal", $groups) && 1 === count($groups)) {
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -209,7 +209,9 @@ class PersonJsonNormalizer implements DenormalizerAwareInterface, NormalizerAwar
|
|||||||
'altNames' => $this->normalizeAltNames($person->getAltNames()),
|
'altNames' => $this->normalizeAltNames($person->getAltNames()),
|
||||||
'gender' => $person->getGender(),
|
'gender' => $person->getGender(),
|
||||||
'current_household_id' => $household ? $this->normalizer->normalize($household->getId(), $format, $context) : null,
|
'current_household_id' => $household ? $this->normalizer->normalize($household->getId(), $format, $context) : null,
|
||||||
'current_residential_addresses' => $currentResidentialAddresses ? $this->normalizer->normalize($currentResidentialAddresses, $format, $context) : null,
|
'current_residential_addresses' => $currentResidentialAddresses ?
|
||||||
|
$this->normalizer->normalize($currentResidentialAddresses, $format, $context) :
|
||||||
|
null,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user