mirror of
https://github.com/internetee/registry.git
synced 2025-07-29 14:06:21 +02:00
Fix code attribute
This commit is contained in:
parent
750bf0821c
commit
0484626fb8
3 changed files with 4 additions and 3 deletions
|
@ -120,7 +120,7 @@ module Actions
|
||||||
contact = Contact.find_by(code: contact_code)
|
contact = Contact.find_by(code: contact_code)
|
||||||
arr = admin ? @admin_contacts : @tech_contacts
|
arr = admin ? @admin_contacts : @tech_contacts
|
||||||
if contact
|
if contact
|
||||||
arr << { contact_id: contact.id }
|
arr << { contact_id: contact.id, contact_code: contact.code }
|
||||||
else
|
else
|
||||||
domain.add_epp_error('2303', 'contact', contact_code, %i[domain_contacts not_found])
|
domain.add_epp_error('2303', 'contact', contact_code, %i[domain_contacts not_found])
|
||||||
end
|
end
|
||||||
|
|
|
@ -125,7 +125,7 @@ module Actions
|
||||||
end
|
end
|
||||||
|
|
||||||
def start_validate_email(props)
|
def start_validate_email(props)
|
||||||
contact = Contact.find(props[0][:contact_id])
|
contact = Contact.find_by(code: props[0][:contact_code])
|
||||||
|
|
||||||
return if contact.nil?
|
return if contact.nil?
|
||||||
|
|
||||||
|
@ -205,7 +205,7 @@ module Actions
|
||||||
domain.add_epp_error('2306', 'contact', code,
|
domain.add_epp_error('2306', 'contact', code,
|
||||||
%i[domain_contacts admin_contact_can_be_only_private_person])
|
%i[domain_contacts admin_contact_can_be_only_private_person])
|
||||||
else
|
else
|
||||||
add ? { contact_id: obj.id } : { id: obj.id, _destroy: 1 }
|
add ? { contact_id: obj.id, contact_code: obj.code } : { id: obj.id, _destroy: 1 }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ class DomainContact < ApplicationRecord
|
||||||
|
|
||||||
after_destroy :update_contact
|
after_destroy :update_contact
|
||||||
attr_accessor :value_typeahead
|
attr_accessor :value_typeahead
|
||||||
|
attr_writer :contact_code
|
||||||
|
|
||||||
self.ignored_columns = %w[legacy_domain_id legacy_contact_id]
|
self.ignored_columns = %w[legacy_domain_id legacy_contact_id]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue