]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video.ts
findById -> findByPk
[github/Chocobozzz/PeerTube.git] / server / models / video / video.ts
index fe81fab1ae4a7e9626527423894734840f4d4fd8..4516b9c7b88d57b61b74dcd41903cd997c564ca9 100644 (file)
@@ -1313,7 +1313,7 @@ export class VideoModel extends Model<VideoModel> {
 
   static loadWithFiles (id: number, t?: Sequelize.Transaction, logging?: boolean) {
     return VideoModel.scope([ ScopeNames.WITH_FILES, ScopeNames.WITH_STREAMING_PLAYLISTS ])
-                     .findById(id, { transaction: t, logging })
+                     .findByPk(id, { transaction: t, logging })
   }
 
   static loadByUUIDWithFile (uuid: string) {