]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/author.ts
Fix integrity issues with after destroy hook
[github/Chocobozzz/PeerTube.git] / server / models / video / author.ts
index 6f27ea7bde223eaa389990b9e2bd5e7428c71934..43f84c3eada0a8c70d929af0c8efa3873647f504 100644 (file)
@@ -107,13 +107,13 @@ function associate (models) {
   })
 }
 
-function afterDestroy (author: AuthorInstance, options: { transaction: Sequelize.Transaction }) {
+function afterDestroy (author: AuthorInstance) {
   if (author.isOwned()) {
     const removeVideoAuthorToFriendsParams = {
       uuid: author.uuid
     }
 
-    return removeVideoAuthorToFriends(removeVideoAuthorToFriendsParams, options.transaction)
+    return removeVideoAuthorToFriends(removeVideoAuthorToFriendsParams)
   }
 
   return undefined