Handle Null TNDetails

Christopher Vollick created

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.

Change summary

forms/configure_calls.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Detailed changes

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",