diff options
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/video/video-live.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/server/models/video/video-live.ts b/server/models/video/video-live.ts index 290e1dda7..1acf9cbf3 100644 --- a/server/models/video/video-live.ts +++ b/server/models/video/video-live.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import { Transaction } from 'sequelize' | ||
1 | import { | 2 | import { |
2 | BeforeDestroy, | ||
3 | AllowNull, | 3 | AllowNull, |
4 | BeforeDestroy, | ||
4 | BelongsTo, | 5 | BelongsTo, |
5 | Column, | 6 | Column, |
6 | CreatedAt, | 7 | CreatedAt, |
@@ -100,11 +101,12 @@ export class VideoLiveModel extends Model<Partial<AttributesOnly<VideoLiveModel> | |||
100 | ReplaySetting: VideoLiveReplaySettingModel | 101 | ReplaySetting: VideoLiveReplaySettingModel |
101 | 102 | ||
102 | @BeforeDestroy | 103 | @BeforeDestroy |
103 | static deleteReplaySetting (instance: VideoLiveModel) { | 104 | static deleteReplaySetting (instance: VideoLiveModel, options: { transaction: Transaction }) { |
104 | return VideoLiveReplaySettingModel.destroy({ | 105 | return VideoLiveReplaySettingModel.destroy({ |
105 | where: { | 106 | where: { |
106 | id: instance.replaySettingId | 107 | id: instance.replaySettingId |
107 | } | 108 | }, |
109 | transaction: options.transaction | ||
108 | }) | 110 | }) |
109 | } | 111 | } |
110 | 112 | ||