From 2a2047e85a8dcadf3c4f9290b5b58c2ea5daae1c Mon Sep 17 00:00:00 2001 From: Christopher Vollick <0@psycoti.ca> Date: Wed, 25 Aug 2021 17:02:32 -0400 Subject: [PATCH] Handle False Registration Turns out my dummy-sgx doesn't act the same as production. Rather than getting a successful registration with no phone, in production I get false, so I need to handle that. --- lib/customer_info.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/customer_info.rb b/lib/customer_info.rb index d3b8b38..09efc9f 100644 --- a/lib/customer_info.rb +++ b/lib/customer_info.rb @@ -16,7 +16,7 @@ class CustomerInfo customer.registered?.then do |registration| new( plan: plan, - tel: registration&.phone, + tel: registration ? registration.phone : nil, balance: customer.balance, expires_at: expires_at ) -- 2.34.2