about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-11-17 10:52:51 +0100
committerGitHub <noreply@github.com>2022-11-17 10:52:51 +0100
commit0cc77263fc4aba44a3c1277ffe617b89d083cfce (patch)
treef16b7de372196dddba9578c53ddb517be4317802
parent413481f9531411497e0c70f16815bb7e75922e4c (diff)
Change batch account suspension to create a strike (#20897)
-rw-r--r--app/models/form/account_batch.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/form/account_batch.rb b/app/models/form/account_batch.rb
index 5cfcf7205..473622edf 100644
--- a/app/models/form/account_batch.rb
+++ b/app/models/form/account_batch.rb
@@ -115,6 +115,10 @@ class Form::AccountBatch
     authorize(account, :suspend?)
     log_action(:suspend, account)
     account.suspend!(origin: :local)
+    account.strikes.create!(
+      account: current_account,
+      action: :suspend
+    )
     Admin::SuspensionWorker.perform_async(account.id)
   end