Skip to content

Commit

Permalink
fix: do not duplicate existing entity
Browse files Browse the repository at this point in the history
- this reverts 1e8048a

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
  • Loading branch information
Antreesy committed Oct 17, 2024
1 parent 4435052 commit dd6668b
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions apps/files/lib/Controller/TransferOwnershipController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit dd6668b

Please sign in to comment.