Skip to content

Commit b953cba

Browse files
State events do no not have an ID.
1 parent 6167769 commit b953cba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

webapp/src/Serializer/Shadowing/EventDenormalizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function denormalize(
5656
$data['data'] = [$data['data']];
5757
}
5858
if ($operation === Operation::CREATE && count($data['data']) === 1) {
59-
$id = $data['data'][0]['id'];
59+
$id = $data['data'][0]['id'] ?? null;
6060
} elseif ($operation === Operation::DELETE) {
6161
$id = $data['id'];
6262
} else {
@@ -87,7 +87,7 @@ public function denormalize(
8787
$data['id'] ?? null,
8888
$eventType,
8989
$operation,
90-
$data['data']['id'],
90+
$data['data']['id'] ?? null,
9191
$eventData,
9292
);
9393
}

0 commit comments

Comments
 (0)