Skip to content

Commit

Permalink
fix: This will fix error when we execute moveTo action on class
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlomiejmarszal committed Jul 10, 2024
1 parent 99cf559 commit b6fc02a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions actions/class.RdfController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1720,7 +1720,13 @@ private function getResourceTransfer(): ResourceTransferInterface

private function getResourceParentClass(string $id): string
{
if ($this->getResource($id)->isClass()) {
$directParent = $this->getResource($id)->getParentClassesIds();
return reset($directParent);
}

$types = $this->getResource($id)->getTypes();

if (count($types) !== 1) {
throw new InvalidArgumentException('Resource has no class or resource types are ambiguous');
}
Expand Down

0 comments on commit b6fc02a

Please sign in to comment.