]> cat aescling's git repositories - mastodon.git/commitdiff
Fix crash in SuspendAccountWorker (#15106)
authorThibG <thib@sitedethib.com>
Sun, 8 Nov 2020 17:29:48 +0000 (18:29 +0100)
committerGitHub <noreply@github.com>
Sun, 8 Nov 2020 17:29:48 +0000 (18:29 +0100)
* Fix crash in SuspendAccountWorker

`follows` is an array thanks to `to_a`

* Fix code style issue

Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
app/services/suspend_account_service.rb

index d7f29963cdb8e6dc0f421a38ef9c2cc198bfb973..7c70a6021b88cdf33fc01aa73596daadc472a7bf 100644 (file)
@@ -38,7 +38,7 @@ class SuspendAccountService < BaseService
       [Oj.dump(serialize_payload(follow, ActivityPub::RejectFollowSerializer)), follow.target_account_id, @account.inbox_url]
     end
 
-    follows.in_batches.destroy_all
+    follows.each(&:destroy)
   end
 
   def distribute_update_actor!