Skip to content

Commit

Permalink
fix(import_remediations): RHICOMPL-1863 fall back to new Account
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Kofink <[email protected]>
  • Loading branch information
akofink committed May 21, 2021
1 parent c4a3cc1 commit 9abf382
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tasks/import_remediations.rake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ task import_remediations: :environment do
start_time = Time.now.utc
puts "Starting import_remediations job at #{start_time}"
RemediationsAPI.new(
Account.find_by!(account_number: ENV['JOBS_ACCOUNT_NUMBER'])
Account.find_by(account_number: ENV['JOBS_ACCOUNT_NUMBER']) || Account.new
).import_remediations
end_time = Time.now.utc
duration = end_time - start_time
Expand Down

0 comments on commit 9abf382

Please sign in to comment.