diff options
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/video/video.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 1134525f0..e011c3b4d 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -300,7 +300,7 @@ function associate (models) { | |||
300 | }) | 300 | }) |
301 | } | 301 | } |
302 | 302 | ||
303 | function afterDestroy (video: VideoInstance) { | 303 | function afterDestroy (video: VideoInstance, options: { transaction: Sequelize.Transaction }) { |
304 | const tasks = [] | 304 | const tasks = [] |
305 | 305 | ||
306 | tasks.push( | 306 | tasks.push( |
@@ -314,10 +314,10 @@ function afterDestroy (video: VideoInstance) { | |||
314 | 314 | ||
315 | tasks.push( | 315 | tasks.push( |
316 | video.removePreview(), | 316 | video.removePreview(), |
317 | removeVideoToFriends(removeVideoToFriendsParams) | 317 | removeVideoToFriends(removeVideoToFriendsParams, options.transaction) |
318 | ) | 318 | ) |
319 | 319 | ||
320 | // TODO: check files is populated | 320 | // Remove physical files and torrents |
321 | video.VideoFiles.forEach(file => { | 321 | video.VideoFiles.forEach(file => { |
322 | video.removeFile(file), | 322 | video.removeFile(file), |
323 | video.removeTorrent(file) | 323 | video.removeTorrent(file) |