]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video-channel.ts
Fix integrity issues with after destroy hook
[github/Chocobozzz/PeerTube.git] / server / models / video / video-channel.ts
index e469383e98a0a25df7000022e6f347aca48e5d36..46c2db63fa56399e0f7ed7c3992f0876253d8fdc 100644 (file)
@@ -178,13 +178,13 @@ function associate (models) {
   })
 }
 
-function afterDestroy (videoChannel: VideoChannelInstance, options: { transaction: Sequelize.Transaction }) {
+function afterDestroy (videoChannel: VideoChannelInstance) {
   if (videoChannel.isOwned()) {
     const removeVideoChannelToFriendsParams = {
       uuid: videoChannel.uuid
     }
 
-    return removeVideoChannelToFriends(removeVideoChannelToFriendsParams, options.transaction)
+    return removeVideoChannelToFriends(removeVideoChannelToFriendsParams)
   }
 
   return undefined