From 516df59b3bbb0218afeda595ee4966800bff4519 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 3 Aug 2018 09:43:00 +0200 Subject: Remove ability to delete video imports Users should remove the linked video instead --- server/models/video/video.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/models') 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 { }) } - static load (id: number) { - return VideoModel.findById(id) + static load (id: number, t?: Sequelize.Transaction) { + const options = t ? { transaction: t } : undefined + + return VideoModel.findById(id, options) } static loadByUrlAndPopulateAccount (url: string, t?: Sequelize.Transaction) { -- cgit v1.2.3