From 90573be1e074bedb531207114886eb83edd0e332 Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Wed, 16 Oct 2024 15:03:29 +0200 Subject: [PATCH] fix: do not duplicate existing entity - this reverts 1e8048abee1745bab648dba5bf96f956c718e4e3 Signed-off-by: Maksim Sukharev (cherry picked from commit 6e7c35d77eb85836a35b6b0c8d8ba24829350066) --- .../files/lib/Controller/TransferOwnershipController.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/apps/files/lib/Controller/TransferOwnershipController.php b/apps/files/lib/Controller/TransferOwnershipController.php index 43648528b50db..d3256b2c7cc77 100644 --- a/apps/files/lib/Controller/TransferOwnershipController.php +++ b/apps/files/lib/Controller/TransferOwnershipController.php @@ -160,15 +160,8 @@ public function accept(int $id): DataResponse { return new DataResponse([], Http::STATUS_FORBIDDEN); } - $newTransferOwnership = new TransferOwnershipEntity(); - $newTransferOwnership->setNodeName($transferOwnership->getNodeName()); - $newTransferOwnership->setFileId($transferOwnership->getFileId()); - $newTransferOwnership->setSourceUser($transferOwnership->getSourceUser()); - $newTransferOwnership->setTargetUser($transferOwnership->getTargetUser()); - $this->mapper->insert($newTransferOwnership); - $this->jobList->add(TransferOwnership::class, [ - 'id' => $newTransferOwnership->getId(), + 'id' => $transferOwnership->getId(), ]); $notification = $this->notificationManager->createNotification();