From fa2d23a580e04048544a70b5ed3bc816915420c5 Mon Sep 17 00:00:00 2001 From: Graeme Porteous Date: Mon, 20 Jan 2025 16:09:14 +0000 Subject: [PATCH] Fix exception with rake task Update options passed into `InfoRequest.reject_incoming_at_mta` to ensure they are cast to integer correct as the method expects. Tests only pass in integers so we should here too. Fixes #8546 --- lib/tasks/config_files.rake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tasks/config_files.rake b/lib/tasks/config_files.rake index 2e8428aa5b..9f1a61e7e4 100644 --- a/lib/tasks/config_files.rake +++ b/lib/tasks/config_files.rake @@ -186,9 +186,9 @@ namespace :config_files do check_for_env_vars(%w[REJECTED_THRESHOLD AGE_IN_MONTHS], example) dryrun = ENV['DRYRUN'] != '0' STDERR.puts "Only a dry run; info_requests will not be updated" if dryrun - options = { rejection_threshold: ENV['REJECTED_THRESHOLD'], - age_in_months: ENV['AGE_IN_MONTHS'], - dryrun: dryrun } + options = { rejection_threshold: ENV['REJECTED_THRESHOLD'].to_i, + age_in_months: ENV['AGE_IN_MONTHS'].to_i, + dryrun: dryrun } updated_count = InfoRequest.reject_incoming_at_mta(options) do |ids| puts "Info Request\tRejected incoming count\tLast updated"