diff options
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r-- | server/models/video/video.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index f32010014..67711b102 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -957,8 +957,10 @@ export class VideoModel extends Model<VideoModel> { | |||
957 | }) | 957 | }) |
958 | } | 958 | } |
959 | 959 | ||
960 | static load (id: number) { | 960 | static load (id: number, t?: Sequelize.Transaction) { |
961 | return VideoModel.findById(id) | 961 | const options = t ? { transaction: t } : undefined |
962 | |||
963 | return VideoModel.findById(id, options) | ||
962 | } | 964 | } |
963 | 965 | ||
964 | static loadByUrlAndPopulateAccount (url: string, t?: Sequelize.Transaction) { | 966 | static loadByUrlAndPopulateAccount (url: string, t?: Sequelize.Transaction) { |