Story: 105754008 Setting domain from queue that it's valid

This commit is contained in:
Vladimir Krylov 2015-10-26 17:42:45 +02:00
parent b088d39b0e
commit 1aa41257c5
2 changed files with 4 additions and 1 deletions

View file

@ -6,7 +6,9 @@ class DomainUpdateConfirmJob < Que::Job
case action
when RegistrantVerification::CONFIRMED
domain.poll_message!(:poll_pending_update_confirmed_by_registrant)
domain.apply_pending_update!
domain.apply_pending_update! do |e|
e.instance_variable_set("@changed_attributes", e.changed_attributes.merge("statuses"=>[]))
end
domain.clean_pendings!
when RegistrantVerification::REJECTED
DomainMailer.pending_update_rejected_notification_for_new_registrant(domain).deliver_now

View file

@ -456,6 +456,7 @@ class Epp::Domain < Domain
user = ApiUser.find(pending_json['current_user_id'])
frame = Nokogiri::XML(pending_json['frame'])
statuses.delete(DomainStatus::PENDING_UPDATE)
yield(self) if block_given? # need to skip statuses check here
return unless update(frame, user, false)
clean_pendings!