Skip to content

Commit

Permalink
Merge pull request #32 from boekuwzending/jvergers-patch-1
Browse files Browse the repository at this point in the history
Update MeSerializer.php
  • Loading branch information
jvergers authored Jun 7, 2024
2 parents dfff585 + a8f95e7 commit bb26da3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Serializer/MeSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ public function deserialize(array $data, string $dataType): Me
$serializer = new Serializer();

$me = new Me();

// $me->setId($data['id']);
// $me->setNumber($data['number']);
$me->setName($data['name']);

$me->setRelation($serializer->deserialize($data['relation'], Relation::class));
if (!isset($data['relation'])) {
$me->setId($data['id']);
$me->setNumber($data['number']);
} else {
$me->setRelation($serializer->deserialize($data['relation'], Relation::class));
}

return $me;
}
Expand Down

0 comments on commit bb26da3

Please sign in to comment.