Skip to content

Commit

Permalink
use array else object for targetId
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrands02 committed Dec 31, 2024
1 parent 216b8da commit 805a05d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Service/SynchronizationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -599,8 +599,9 @@ private function updateTargetOpenRegister(SynchronizationContract $synchronizati
switch ($action) {
case 'save':
$target = $objectService->saveObject($register, $schema, $targetObject);
$targetId = is_array($target) ? $target['uuid'] : $target->getUuid();
// Get the id form the target object
$synchronizationContract->setTargetId($target->getUuid());
$synchronizationContract->setTargetId($targetId);
break;
case 'delete':
$objectService->deleteObject(register: $register, schema: $schema, uuid: $synchronizationContract->getTargetId());
Expand Down

0 comments on commit 805a05d

Please sign in to comment.