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