person: create a person with address (and household without position (remove required position for household member)

This commit is contained in:
nobohan
2022-04-19 18:01:25 +02:00
parent c214c2f4a4
commit bad5506b98
8 changed files with 80 additions and 70 deletions

View File

@@ -116,12 +116,18 @@ class MembersEditorNormalizer implements DenormalizerAwareInterface, Denormalize
$format,
$context
);
$position = $this->denormalizer->denormalize(
$concerned['position'] ?? null,
Position::class,
$format,
$context
);
if (\array_key_exists('position', $concerned)) {
$position = $this->denormalizer->denormalize(
$concerned['position'] ?? null,
Position::class,
$format,
$context
);
} else {
$position = null;
}
$startDate = $this->denormalizer->denormalize(
$concerned['start_date'] ?? null,
DateTimeImmutable::class,