]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/initializers/migrations/0080-video-channels.ts
findById -> findByPk
[github/Chocobozzz/PeerTube.git] / server / initializers / migrations / 0080-video-channels.ts
index f197215176c14d876b0767e1f7887f4424933f4d..0e17a4ccde72937b3b4d93eb25401435d65ff527 100644 (file)
@@ -74,7 +74,7 @@ async function up (utils: {
   for (const rawVideo of rawVideos) {
     const videoChannel = await utils.db.VideoChannel.findOne({ where: { authorId: rawVideo.authorId } })
 
-    const video = await utils.db.Video.findById(rawVideo.id)
+    const video = await utils.db.Video.findByPk(rawVideo.id)
     video.channelId = videoChannel.id
     await video.save()
   }