Change summary
forms/configure_calls.rb | 4 ++--
lib/customer_info.rb | 2 +-
lib/customer_repo.rb | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
Detailed changes
@@ -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",
@@ -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
@@ -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)