Allow EPP contact:update with the same ident data as current one

#569
This commit is contained in:
Artur Beljajev 2017-09-29 00:39:25 +03:00
parent 1ae00382cd
commit 5b4658b905
2 changed files with 44 additions and 23 deletions

View file

@ -158,7 +158,11 @@ class Epp::Contact < Contact
# https://github.com/internetee/registry/issues/576
if ident_frame
if identifier.valid?
report_valid_ident_error
submitted_ident = Ident.new(code: ident_frame.text,
type: ident_frame.attr('type'),
country_code: ident_frame.attr('cc'))
report_valid_ident_error if submitted_ident != identifier
else
ident_update_attempt = ident_frame.text.present? && (ident_frame.text != ident)
report_ident_update_error if ident_update_attempt