mirror of
https://github.com/internetee/registry.git
synced 2025-08-28 03:53:33 +02:00
feat: add ability to skip business contact validation
- Add environment variable 'allow_validate_business_contacts' to control business contact validation - Remove redundant company_is_relevant? method - Add integration test for skipping company validation
This commit is contained in:
parent
ebc9fd4871
commit
c77a4d494d
4 changed files with 39 additions and 4 deletions
|
@ -80,6 +80,7 @@ module Actions
|
|||
end
|
||||
|
||||
def maybe_company_is_relevant
|
||||
return true if ENV['allow_validate_business_contacts'] && ENV['allow_validate_business_contacts'] == 'false'
|
||||
return true unless contact.org?
|
||||
return true unless contact.ident_country_code == 'EE'
|
||||
|
||||
|
|
|
@ -6,10 +6,6 @@ module Contact::CompanyRegister
|
|||
BANKRUPT = 'N'.freeze
|
||||
DELETED = 'K'.freeze
|
||||
|
||||
def company_is_relevant?
|
||||
company_register_status == REGISTERED && company_register_status == LIQUIDATED
|
||||
end
|
||||
|
||||
def return_company_status
|
||||
return if return_company_data.blank?
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue