Skip to content

Commit

Permalink
call company status directly
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegPhenomenon committed Nov 25, 2024
1 parent 7f6c4f2 commit 6d810bb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/interactions/actions/contact_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,14 @@ def maybe_company_is_relevant

Rails.logger.info "======= I AM HERE"

company_status = contact.return_company_status
# company_status = contact.return_company_status
# Rails.logger.info "company_status: #{company_status}"

company_register = CompanyRegister::Client.new
res = company_register.simple_data(registration_number: ident.to_s)
Rails.logger.info "res: #{res.inspect}"

company_status = res.first[:status]
Rails.logger.info "company_status: #{company_status}"

return if [Contact::REGISTERED, Contact::LIQUIDATED].include? company_status
Expand Down

0 comments on commit 6d810bb

Please sign in to comment.