M forms/configure_calls.rb => forms/configure_calls.rb +2 -2
@@ 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&.dig(:on_net_vendor)
+elsif @customer.tndetails[:on_net_vendor]
field(
var: "lidb_name",
type: "text-single",
M lib/customer_info.rb => lib/customer_info.rb +1 -1
@@ 83,7 83,7 @@ class CustomerInfo
plan_info: plan_info,
tel: customer.registered? ? customer.registered?.phone : nil,
balance: customer.balance,
- cnam: customer.tndetails&.dig(:features, :lidb, :subscriber_information)
+ cnam: customer.tndetails.dig(:features, :lidb, :subscriber_information)
)
end
end
M lib/customer_repo.rb => lib/customer_repo.rb +1 -1
@@ 167,7 167,7 @@ protected
def tndetails(sgx)
return unless sgx.registered?
- LazyObject.new { @bandwidth_tn_repo.find(sgx.registered?.phone) }
+ LazyObject.new { @bandwidth_tn_repo.find(sgx.registered?.phone) || {} }
end
def find_inner(customer_id, jid)