mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 02:05:57 +02:00
parent
feb8d83a26
commit
d8118878b1
1 changed files with 12 additions and 13 deletions
|
@ -153,26 +153,25 @@ class Epp::Contact < Contact
|
||||||
|
|
||||||
self.deliver_emails = true # turn on email delivery for epp
|
self.deliver_emails = true # turn on email delivery for epp
|
||||||
|
|
||||||
if frame.css('ident').first
|
ident_frame = frame.css('ident').first
|
||||||
ident_frame = frame.css('ident').first
|
|
||||||
|
|
||||||
# https://github.com/internetee/registry/issues/576
|
# https://github.com/internetee/registry/issues/576
|
||||||
|
if ident_frame
|
||||||
if identifier.valid?
|
if identifier.valid?
|
||||||
deny_ident_update
|
deny_ident_update
|
||||||
else
|
else
|
||||||
if ident_frame && ident_attr_valid?(ident_frame)
|
ident_change_disallowed = ident_frame.text.present? && (ident_frame.text != ident)
|
||||||
deny_ident_update if ident_frame.text != ident
|
deny_ident_update if ident_change_disallowed
|
||||||
|
|
||||||
identifier = Ident.new(code: ident,
|
identifier = Ident.new(code: ident,
|
||||||
type: ident_frame.attr('type'),
|
type: ident_frame.attr('type'),
|
||||||
country_code: ident_frame.attr('cc'),
|
country_code: ident_frame.attr('cc'),
|
||||||
)
|
)
|
||||||
|
|
||||||
identifier.validate
|
identifier.validate
|
||||||
|
|
||||||
self.identifier = identifier
|
self.identifier = identifier
|
||||||
self.ident_updated_at ||= Time.zone.now
|
self.ident_updated_at ||= Time.zone.now
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue