From 991504c9ee8392be49179604855fdf9b3cb03f78 Mon Sep 17 00:00:00 2001 From: Remko Date: Fri, 17 Jan 2025 11:11:20 +0100 Subject: [PATCH] Backend fix --- lib/Service/ObjectService.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Service/ObjectService.php b/lib/Service/ObjectService.php index d237e181..f6572ccb 100644 --- a/lib/Service/ObjectService.php +++ b/lib/Service/ObjectService.php @@ -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); @@ -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); } }