Skip to content

Commit 4382370

Browse files
committed
fix: send the UUID of file to prevent save to diferent file
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 78a7dad commit 4382370

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/Service/RequestSignatureService.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,11 @@ private function saveVisibleElements(array $data, FileEntity $file): array {
567567
}
568568
$elements = $data['visibleElements'];
569569
foreach ($elements as $key => $element) {
570-
$element['fileId'] = $file->getId();
571-
$elements[$key] = $this->fileElementService->saveVisibleElement($element);
570+
if (empty($element['uuid']) && empty($element['fileId'])) {
571+
$element['fileId'] = $file->getId();
572+
}
573+
$uuid = $element['uuid'] ?? '';
574+
$elements[$key] = $this->fileElementService->saveVisibleElement($element, $uuid);
572575
}
573576
return $elements;
574577
}

0 commit comments

Comments
 (0)