Skip to content

Commit

Permalink
Backend fix
Browse files Browse the repository at this point in the history
  • Loading branch information
remko48 committed Jan 17, 2025
1 parent 122fe90 commit 991504c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Service/ObjectService.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ public function getAllObjects(string $objectType, ?int $limit = null, ?int $offs
* @return mixed The created or updated object.
* @throws ContainerExceptionInterface|DoesNotExistException|MultipleObjectsReturnedException|NotFoundExceptionInterface
*/
public function saveObject(string $objectType, array $object, bool $updateVersion = true): mixed
public function saveObject(string $objectType, array $object, array $extend = [], bool $updateVersion = true): mixed
{
if ($objectType === 'publication') {
$object = $this->validationService->validatePublication($object);
Expand All @@ -321,10 +321,10 @@ public function saveObject(string $objectType, array $object, bool $updateVersio

// If the object has an id, update it; otherwise, create a new object
if (isset($object['id']) === true) {
return $mapper->updateFromArray($object['id'], $object, $updateVersion, patch: true);
return $mapper->updateFromArray($object['id'], $object, $updateVersion, patch: true, extend: $extend);
}
else {
return $mapper->createFromArray($object);
return $mapper->createFromArray(object: $object, extend: $extend);
}
}

Expand Down

0 comments on commit 991504c

Please sign in to comment.