diff --git a/lib/empty_repo.rb b/lib/empty_repo.rb new file mode 100644 index 0000000000000000000000000000000000000000..e559bbf680a86c91a303f8866a91a7f5ba2f18a1 --- /dev/null +++ b/lib/empty_repo.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +class EmptyRepo + def find(*); end +end diff --git a/sgx_jmp.rb b/sgx_jmp.rb index f99cda1f569566a1680667ac8bcfb62338f2af7f..7891cd95cce055283b63d25fb43ed68f9aeb3f35 100644 --- a/sgx_jmp.rb +++ b/sgx_jmp.rb @@ -82,6 +82,7 @@ require_relative "lib/customer" require_relative "lib/customer_info_form" require_relative "lib/customer_repo" require_relative "lib/electrum" +require_relative "lib/empty_repo" require_relative "lib/expiring_lock" require_relative "lib/em" require_relative "lib/form_to_h" @@ -725,7 +726,10 @@ Command.new( reply.allowed_actions = [:next] reply.command << FormTemplate.render("customer_picker") }.then { |response| - CustomerInfoForm.new.find_customer(response) + CustomerInfoForm.new(CustomerRepo.new( + sgx_repo: Bwmsgsv2Repo.new, + bandwidth_tn_repo: EmptyRepo.new # No CNAM in admin + )).find_customer(response) }.then do |target_customer| AdminCommand.new(target_customer).start end