]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/videos/ownership.ts
Fix missing transactions
[github/Chocobozzz/PeerTube.git] / server / controllers / api / videos / ownership.ts
index 2d6ca60a821eba6051d89daacce8ead0353479c5..1bb96e0460260801a39ec0c786f662683c9f023a 100644 (file)
@@ -105,9 +105,9 @@ function acceptOwnership (req: express.Request, res: express.Response) {
     const channel = res.locals.videoChannel
 
     // We need more attributes for federation
-    const targetVideo = await VideoModel.loadAndPopulateAccountAndServerAndTags(videoChangeOwnership.Video.id)
+    const targetVideo = await VideoModel.loadAndPopulateAccountAndServerAndTags(videoChangeOwnership.Video.id, t)
 
-    const oldVideoChannel = await VideoChannelModel.loadAndPopulateAccount(targetVideo.channelId)
+    const oldVideoChannel = await VideoChannelModel.loadAndPopulateAccount(targetVideo.channelId, t)
 
     targetVideo.channelId = channel.id