mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Story #105846070 - also return relation when business registry has no data
This commit is contained in:
parent
9d2f23a71d
commit
342de9a9c9
1 changed files with 5 additions and 1 deletions
|
@ -39,7 +39,11 @@ class BusinessRegistryCache < ActiveRecord::Base
|
||||||
|
|
||||||
def fetch_associated_domains(ident_code, ident_cc)
|
def fetch_associated_domains(ident_code, ident_cc)
|
||||||
cached = fetch_by_ident_and_cc(ident_code, ident_cc)
|
cached = fetch_by_ident_and_cc(ident_code, ident_cc)
|
||||||
cached.associated_domains unless cached.blank?
|
if cached.blank?
|
||||||
|
Domain.includes(:registrar, :registrant).where(contacts: {ident: ident_code, ident_country_code: ident_cc})
|
||||||
|
else
|
||||||
|
cached.associated_domains
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def fetch_by_ident_and_cc(ident_code, ident_cc)
|
def fetch_by_ident_and_cc(ident_code, ident_cc)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue