From e8aeceb7ad7f9f9f3dc3d988cb78e537f7f4ecf0 Mon Sep 17 00:00:00 2001 From: Christopher Vollick <0@psycoti.ca> Date: Wed, 19 Jan 2022 10:22:19 -0500 Subject: [PATCH] Handle Null TNDetails This is based on a hotfix in prod. In this case someone appeared to have talked to an @jmp.chat address directly. In normal circumstances this shouldn't happen, but it's not technically disallowed, so we probably shouldn't just crash. --- forms/configure_calls.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forms/configure_calls.rb b/forms/configure_calls.rb index a9312e2a4ff0d486585c7eb678e92076318ec882..6f6a3d34fd65f15735c2bdbea761b5e2b4ccd3ce 100644 --- a/forms/configure_calls.rb +++ b/forms/configure_calls.rb @@ -31,14 +31,14 @@ field( value: @customer.fwd.uri ) -if (lidb = @customer.tndetails.dig(:features, :lidb)) +if (lidb = @customer.tndetails&.dig(:features, :lidb)) field( var: "lidb_name", type: "fixed", label: "CNAM", value: "#{lidb[:subscriber_information]} (#{lidb[:status]})" ) -elsif @customer.tndetails[:on_net_vendor] +elsif @customer.tndetails&.dig(:on_net_vendor) field( var: "lidb_name", type: "text-single",