mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 10:16:01 +02:00
Story#117991277 - allow to update country code if ident type is birthday
This commit is contained in:
parent
f2f05ddfbd
commit
5048b9309e
1 changed files with 2 additions and 0 deletions
|
@ -173,6 +173,8 @@ class Epp::Contact < Contact
|
||||||
elsif ident_type == "birthday" && !ident[/\A\d{4}-\d{2}-\d{2}\z/] && (Date.parse(ident) rescue false)
|
elsif ident_type == "birthday" && !ident[/\A\d{4}-\d{2}-\d{2}\z/] && (Date.parse(ident) rescue false)
|
||||||
at.merge!(ident: ident_frame.text)
|
at.merge!(ident: ident_frame.text)
|
||||||
at.merge!(ident_country_code: ident_frame.attr('cc')) if ident_frame.attr('cc').present?
|
at.merge!(ident_country_code: ident_frame.attr('cc')) if ident_frame.attr('cc').present?
|
||||||
|
elsif ident_type == "birthday" && ident_country_code.blank?
|
||||||
|
at.merge!(ident_country_code: ident_frame.attr('cc'))
|
||||||
elsif ident_type.blank? && ident_country_code.blank?
|
elsif ident_type.blank? && ident_country_code.blank?
|
||||||
at.merge!(ident_type: ident_frame.attr('type'))
|
at.merge!(ident_type: ident_frame.attr('type'))
|
||||||
at.merge!(ident_country_code: ident_frame.attr('cc')) if ident_frame.attr('cc').present?
|
at.merge!(ident_country_code: ident_frame.attr('cc')) if ident_frame.attr('cc').present?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue