Remove contact code cache from domain contacts table

This commit is contained in:
Thiago Youssef 2022-05-04 14:38:14 +03:00
parent 3852620180
commit 750bf0821c
11 changed files with 42 additions and 50 deletions

View file

@ -125,8 +125,7 @@ module Actions
end
def start_validate_email(props)
contact_code = props[0][:contact_code_cache]
contact = Contact.find_by(code: contact_code)
contact = Contact.find(props[0][:contact_id])
return if contact.nil?
@ -206,7 +205,7 @@ module Actions
domain.add_epp_error('2306', 'contact', code,
%i[domain_contacts admin_contact_can_be_only_private_person])
else
add ? { contact_id: obj.id, contact_code_cache: obj.code } : { id: obj.id, _destroy: 1 }
add ? { contact_id: obj.id } : { id: obj.id, _destroy: 1 }
end
end