From 9b39106d5757caf221a88e42e05167a6fac479c6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 21 Feb 2019 14:28:06 +0100 Subject: findById -> findByPk --- server/initializers/migrations/0080-video-channels.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/initializers/migrations') diff --git a/server/initializers/migrations/0080-video-channels.ts b/server/initializers/migrations/0080-video-channels.ts index f19721517..0e17a4ccd 100644 --- a/server/initializers/migrations/0080-video-channels.ts +++ b/server/initializers/migrations/0080-video-channels.ts @@ -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() } -- cgit v1.2.3