From 6a6b98af65a5b77e4b720f31cc3db743b22a199f Mon Sep 17 00:00:00 2001 From: ThibG Date: Sun, 8 Nov 2020 18:29:48 +0100 Subject: [PATCH] Fix crash in SuspendAccountWorker (#15106) * Fix crash in SuspendAccountWorker `follows` is an array thanks to `to_a` * Fix code style issue Co-authored-by: Eugen Rochko --- app/services/suspend_account_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/suspend_account_service.rb b/app/services/suspend_account_service.rb index d7f29963cd..7c70a6021b 100644 --- a/app/services/suspend_account_service.rb +++ b/app/services/suspend_account_service.rb @@ -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!