Skip to content

Commit

Permalink
State events do no not have an ID.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicky Gerritsen committed Feb 28, 2024
1 parent cbecea6 commit b038ed0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webapp/src/Serializer/Shadowing/EventDenormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function denormalize(
$data['data'] = [$data['data']];
}
if ($operation === Operation::CREATE && count($data['data']) === 1) {
$id = $data['data'][0]['id'];
$id = $data['data'][0]['id'] ?? null;
} elseif ($operation === Operation::DELETE) {
$id = $data['id'];
} else {
Expand Down Expand Up @@ -87,7 +87,7 @@ public function denormalize(
$data['id'] ?? null,
$eventType,
$operation,
$data['data']['id'],
$data['data']['id'] ?? null,
$eventData,
);
}
Expand Down

0 comments on commit b038ed0

Please sign in to comment.