mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-11-04 11:18:25 +00:00 
			
		
		
		
	PersonJsonNormalizer: fix circular reference with residential address
This commit is contained in:
		@@ -197,7 +197,7 @@ class PersonJsonNormalizer implements DenormalizerAwareInterface, NormalizerAwar
 | 
			
		||||
            '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;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@@ -209,7 +209,9 @@ class PersonJsonNormalizer implements DenormalizerAwareInterface, NormalizerAwar
 | 
			
		||||
            'altNames' => $this->normalizeAltNames($person->getAltNames()),
 | 
			
		||||
            'gender' => $person->getGender(),
 | 
			
		||||
            '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,
 | 
			
		||||
        ]);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user