From 9421eda9a9e7b128d2bd03f6dafe1ca6cf94e185 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 2 Jan 2024 14:35:15 -0500 Subject: [PATCH] Don't try to use the nil customers --- bin/sim_job | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sim_job b/bin/sim_job index 33fefc40ef8a234f18cea2d812e0cdb6ff15e457..e89dc386ebeb6a8b73d793c500cfee992f7bf2b8 100755 --- a/bin/sim_job +++ b/bin/sim_job @@ -231,7 +231,7 @@ def fetch_customers(cids) CUSTOMER_REPO.find(id).catch_only(CustomerRepo::NotFound) { nil } } ).then do |customers| - Hash[customers.map { |c| [c.customer_id, JobCustomer.new(c)] }] + Hash[customers.compact.map { |c| [c.customer_id, JobCustomer.new(c)] }] end end