From f2ae9ee64c3de5b41ee5379214291bb9cdb197a4 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Fri, 12 Jun 2015 19:37:15 +0300 Subject: [PATCH] skip verify when applying pending update #2557 --- app/models/epp/domain.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/epp/domain.rb b/app/models/epp/domain.rb index f6870f7c4..43ee165f2 100644 --- a/app/models/epp/domain.rb +++ b/app/models/epp/domain.rb @@ -381,7 +381,7 @@ class Epp::Domain < Domain }] end - def update(frame, current_user) + def update(frame, current_user, verify = true) return super if frame.blank? at = {}.with_indifferent_access at.deep_merge!(attrs_from(frame.css('chg'), current_user)) @@ -394,7 +394,7 @@ class Epp::Domain < Domain at[:dnskeys_attributes] += at_add[:dnskeys_attributes] at[:domain_statuses_attributes] += at_add[:domain_statuses_attributes] - if frame.css('registrant').present? && frame.css('registrant').attr('verified').to_s.downcase != 'yes' && !pending_update? + if verify && frame.css('registrant').present? && frame.css('registrant').attr('verified').to_s.downcase != 'yes' registrant_verification_asked!(frame.to_s, current_user.id) end self.deliver_emails = true # turn on email delivery for epp @@ -408,7 +408,7 @@ class Epp::Domain < Domain frame = Nokogiri::XML(pending_json['frame']) domain_statuses.where(value: DomainStatus::PENDING_UPDATE).destroy_all domain_statuses.reload - if update(frame, user) + if update(frame, user, false) clean_pendings! end end