Skip to content

Commit

Permalink
Update ManyToOneRelation.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kingjia90 authored Feb 19, 2024
1 parent 72d32e9 commit 8a85a35
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/GraphQL/DataObjectInputProcessor/ManyToOneRelation.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ public function process($object, $newValue, $args, $context, ResolveInfo $info):

if (is_array($newValue)) {
$element = $this->getElementByTypeAndIdOrPath($newValue);
}

if (!$element) {
throw new NotFoundException(
sprintf('Element with id %s or fullpath %s not found',
$newValue['id'],
$newValue['fullpath']
)
);
if (!$element) {
throw new NotFoundException(
sprintf('Element with id %s or fullpath %s not found',
$newValue['id'],
$newValue['fullpath']
)
);
}
}

return $container->$setter($element);
Expand Down

0 comments on commit 8a85a35

Please sign in to comment.