mirror of
https://github.com/internetee/registry.git
synced 2025-07-01 16:53:37 +02:00
Story #105846070 - ensure that person search is limited to person contacts to avoid pollution
This commit is contained in:
parent
342de9a9c9
commit
8f29a2f94a
1 changed files with 4 additions and 1 deletions
|
@ -40,7 +40,10 @@ 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)
|
||||||
if cached.blank?
|
if cached.blank?
|
||||||
Domain.includes(:registrar, :registrant).where(contacts: {ident: ident_code, ident_country_code: ident_cc})
|
Domain.includes(:registrar, :registrant).where(contacts: {
|
||||||
|
ident_type: 'priv',
|
||||||
|
ident: ident_code,
|
||||||
|
ident_country_code: ident_cc})
|
||||||
else
|
else
|
||||||
cached.associated_domains
|
cached.associated_domains
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue