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 <[email protected]>

[skip ci]
  • Loading branch information
Antreesy authored and backportbot[bot] committed Oct 17, 2024
1 parent 7c2dad2 commit c3041c0
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 c3041c0

Please sign in to comment.