mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-11-08 05:08:25 +00:00
Fix PersonIdentifier lookup in PersonJsonDenormalizer to use Definition ID comparison.
- Updated lambda function to compare `personIdentifier`'s `Definition` ID instead of its own ID for correct matching.
This commit is contained in:
@@ -121,7 +121,7 @@ final class PersonJsonDenormalizer implements DenormalizerInterface, Denormalize
|
||||
continue;
|
||||
}
|
||||
|
||||
$personIdentifier = $person->getIdentifiers()->findFirst(fn (int $key, PersonIdentifier $personIdentifier) => $personIdentifier->getId() === $definitionId);
|
||||
$personIdentifier = $person->getIdentifiers()->findFirst(fn (int $key, PersonIdentifier $personIdentifier) => $personIdentifier->getDefinition()->getId() === $definitionId);
|
||||
if (null === $personIdentifier) {
|
||||
$personIdentifier = new PersonIdentifier($worker->getDefinition());
|
||||
$person->addIdentifier($personIdentifier);
|
||||
|
||||
Reference in New Issue
Block a user