From 0a4d0e8320ae9fc5c446828743008db3b45bcb13 Mon Sep 17 00:00:00 2001 From: ThibG Date: Fri, 13 Nov 2020 22:17:04 +0100 Subject: [PATCH] Fix AccountDeletionWorker not accepting keyword arguments (#15152) --- app/workers/account_deletion_worker.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/workers/account_deletion_worker.rb b/app/workers/account_deletion_worker.rb index b6016bf8cba..81c3b91ad8d 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