mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 09:43:36 +02:00
Story#109623634 - contacts ident data can be changed if ident_cc is not set or birthday is in wrong format
This commit is contained in:
parent
9d6fc7140d
commit
58bc4cc13b
1 changed files with 7 additions and 13 deletions
|
@ -160,20 +160,14 @@ class Epp::Contact < Contact
|
||||||
self.ident_updated_at ||= Time.zone.now # not in use
|
self.ident_updated_at ||= Time.zone.now # not in use
|
||||||
ident_frame = frame.css('ident').first
|
ident_frame = frame.css('ident').first
|
||||||
|
|
||||||
if ident_frame && ident_attr_valid?(ident_frame) && ident_country_code.blank? && ident_type.in?(%w(org priv).freeze)
|
if ident_frame && ident_attr_valid?(ident_frame)
|
||||||
at.merge!(ident_country_code: ident_frame.attr('cc'))
|
if ident_country_code.blank? && ident_type.in?(%w(org priv).freeze)
|
||||||
|
at.merge!(ident_country_code: ident_frame.attr('cc'))
|
||||||
|
end
|
||||||
|
if ident_type == "birthday" && ident !=~ /\d{4}-\d{2}-\d{2}/
|
||||||
|
at.merge!(ident: ident_frame.text)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Deprecated
|
|
||||||
# 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
|
end
|
||||||
|
|
||||||
super(at)
|
super(at)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue