From: ThibG Date: Fri, 13 Nov 2020 21:17:04 +0000 (+0100) Subject: Fix AccountDeletionWorker not accepting keyword arguments (#15152) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=0a4d0e8320ae9fc5c446828743008db3b45bcb13;p=mastodon.git Fix AccountDeletionWorker not accepting keyword arguments (#15152) --- diff --git a/app/workers/account_deletion_worker.rb b/app/workers/account_deletion_worker.rb index b6016bf8c..81c3b91ad 100644 --- a/app/workers/account_deletion_worker.rb +++ b/app/workers/account_deletion_worker.rb @@ -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