diff options
author | Chocobozzz <me@florianbigard.com> | 2019-02-21 14:28:06 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-02-21 14:40:10 +0100 |
commit | 9b39106d5757caf221a88e42e05167a6fac479c6 (patch) | |
tree | ce3ac7907135d82ad13abf648eff4f963448227e /server/initializers | |
parent | 374c1db98cf22527f5b362c70d3c50e3be4c8885 (diff) | |
download | PeerTube-9b39106d5757caf221a88e42e05167a6fac479c6.tar.gz PeerTube-9b39106d5757caf221a88e42e05167a6fac479c6.tar.zst PeerTube-9b39106d5757caf221a88e42e05167a6fac479c6.zip |
findById -> findByPk
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/migrations/0080-video-channels.ts | 2 |
1 files changed, 1 insertions, 1 deletions
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: { | |||
74 | for (const rawVideo of rawVideos) { | 74 | for (const rawVideo of rawVideos) { |
75 | const videoChannel = await utils.db.VideoChannel.findOne({ where: { authorId: rawVideo.authorId } }) | 75 | const videoChannel = await utils.db.VideoChannel.findOne({ where: { authorId: rawVideo.authorId } }) |
76 | 76 | ||
77 | const video = await utils.db.Video.findById(rawVideo.id) | 77 | const video = await utils.db.Video.findByPk(rawVideo.id) |
78 | video.channelId = videoChannel.id | 78 | video.channelId = videoChannel.id |
79 | await video.save() | 79 | await video.save() |
80 | } | 80 | } |