Fix disclosable scope when copying registrant to admin/tech

This commit is contained in:
Karl Erik Õunapuu 2021-01-11 16:16:07 +02:00
parent 70759cb51b
commit d4b84a58df
No known key found for this signature in database
GPG key ID: C9DD647298A34764

View file

@ -110,8 +110,10 @@ class Epp::Domain < Domain
def attach_default_contacts
return if registrant.blank?
tech_contacts << registrant if tech_domain_contacts.blank?
admin_contacts << registrant if admin_domain_contacts.blank? && !registrant.org?
registrant_obj = Contact.find_by(code: registrant.code)
tech_contacts << registrant_obj if tech_domain_contacts.blank?
admin_contacts << registrant_obj if admin_domain_contacts.blank? && !registrant.org?
end
def apply_pending_delete!