mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 09:21:43 +02:00
Allow invalid ident update #2859
This commit is contained in:
parent
0944bd2077
commit
4a32c7641c
18 changed files with 101 additions and 32 deletions
|
@ -118,6 +118,7 @@ class Epp::Contact < Contact
|
|||
[:ident, :invalid_EE_identity_format],
|
||||
[:ident, :invalid_birthday_format],
|
||||
[:ident, :invalid_country_code],
|
||||
[:ident_type, :missing],
|
||||
[:code, :invalid],
|
||||
[:code, :too_long_contact_code]
|
||||
],
|
||||
|
@ -144,6 +145,20 @@ class Epp::Contact < Contact
|
|||
legal_frame = frame.css('legalDocument').first
|
||||
at[:legal_documents_attributes] = self.class.legal_document_attrs(legal_frame)
|
||||
self.deliver_emails = true # turn on email delivery for epp
|
||||
|
||||
# allow to update ident code for legacy contacts
|
||||
if frame.css('ident').first.present?
|
||||
if ident_updated_at.present?
|
||||
throw :epp_error, {
|
||||
code: '2306',
|
||||
msg: I18n.t(:ident_update_error)
|
||||
}
|
||||
else
|
||||
at.merge!(self.class.ident_attrs(frame.css('ident').first))
|
||||
self.ident_updated_at = Time.zone.now
|
||||
end
|
||||
end
|
||||
|
||||
super(at)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue