]> cat aescling's git repositories - mastodon.git/commitdiff
Fix AccountDeletionWorker not accepting keyword arguments (#15152)
authorThibG <thib@sitedethib.com>
Fri, 13 Nov 2020 21:17:04 +0000 (22:17 +0100)
committerGitHub <noreply@github.com>
Fri, 13 Nov 2020 21:17:04 +0000 (22:17 +0100)
app/workers/account_deletion_worker.rb

index b6016bf8cbae0942b778ca661308745943b08058..81c3b91ad8dc1954301aa9b987f4977470cd58e0 100644 (file)
@@ -5,7 +5,8 @@ class AccountDeletionWorker
 
   sidekiq_options queue: 'pull'
 
-  def perform(account_id, reserve_username: true)
+  def perform(account_id, options = {})
+    reserve_username = options.with_indifferent_access.fetch(:reserve_username, true)
     DeleteAccountService.new.call(Account.find(account_id), reserve_username: reserve_username, reserve_email: false)
   rescue ActiveRecord::RecordNotFound
     true