Skip to content

Commit

Permalink
Merge pull request #1653 from ConductionNL/fix/check-id-for-self
Browse files Browse the repository at this point in the history
check getId()
  • Loading branch information
bbrands02 authored May 31, 2024
2 parents f748c87 + 6613a4a commit d61dda9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/src/Entity/ObjectEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ public function getSelf(): ?string

// Add path item to self uri
foreach ($pathArray as $pathItem) {
if ($pathItem == 'id' || $pathItem == '{id}' || $pathItem == 'uuid' || $pathItem == '{uuid}') {
if ($this->getId() !== null && ($pathItem == 'id' || $pathItem == '{id}' || $pathItem == 'uuid' || $pathItem == '{uuid}')) {
$idSet = true;
$tempPath .= '/'.$this->getId()->toString();
} else {
Expand Down

0 comments on commit d61dda9

Please sign in to comment.