mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 18:29:40 +02:00
Story #104525314 - bug fix, now pendingDeleteConfirmation must transit to pendingDelete, or cancel pending
This commit is contained in:
parent
a48abe621e
commit
64b0e391a4
3 changed files with 9 additions and 6 deletions
|
@ -7,12 +7,10 @@ class DomainDeleteConfirmJob < Que::Job
|
|||
when RegistrantVerification::CONFIRMED
|
||||
domain.poll_message!(:poll_pending_delete_confirmed_by_registrant)
|
||||
domain.apply_pending_delete!
|
||||
domain.clean_pendings!
|
||||
when RegistrantVerification::REJECTED
|
||||
DomainMailer.pending_delete_rejected_notification(domain).deliver_now
|
||||
domain.statuses.delete(DomainStatus::PENDING_DELETE_CONFIRMATION)
|
||||
domain.poll_message!(:poll_pending_delete_rejected_by_registrant)
|
||||
domain.clean_pendings!
|
||||
domain.cancel_pending_delete
|
||||
end
|
||||
destroy # it's best to destroy the job in the same transaction
|
||||
end
|
||||
|
|
|
@ -492,6 +492,12 @@ class Domain < ActiveRecord::Base
|
|||
DomainMailer.pending_deleted(self).deliver_now
|
||||
end
|
||||
|
||||
def cancel_pending_delete
|
||||
statuses.delete DomainStatus::PENDING_DELETE_CONFIRMATION
|
||||
statuses.delete DomainStatus::PENDING_DELETE
|
||||
delete_at = nil
|
||||
end
|
||||
|
||||
def pricelist(operation, period_i = nil, unit = nil)
|
||||
period_i ||= period
|
||||
unit ||= period_unit
|
||||
|
|
|
@ -487,9 +487,8 @@ class Epp::Domain < Domain
|
|||
statuses.delete(DomainStatus::PENDING_DELETE_CONFIRMATION)
|
||||
statuses.delete(DomainStatus::PENDING_DELETE)
|
||||
DomainMailer.delete_confirmation(self).deliver_now
|
||||
|
||||
# TODO: confirm that this actually makes sense
|
||||
clean_pendings! if valid? && set_pending_delete!
|
||||
clean_pendings!
|
||||
set_pending_delete!
|
||||
true
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue