mirror of
https://github.com/internetee/registry.git
synced 2025-07-31 23:16:23 +02:00
Improved Lift Force Delete
This commit is contained in:
parent
3e3c42ce7e
commit
12625ac210
4 changed files with 11 additions and 7 deletions
|
@ -2,10 +2,17 @@ module Domains
|
||||||
module CancelForceDelete
|
module CancelForceDelete
|
||||||
class CancelForceDelete < Base
|
class CancelForceDelete < Base
|
||||||
def execute
|
def execute
|
||||||
compose(RemoveForceDeleteStatuses, inputs.to_h)
|
Domain.transaction do
|
||||||
compose(RestoreStatusesBeforeForceDelete, inputs.to_h)
|
compose(RemoveForceDeleteStatuses, inputs.to_h)
|
||||||
compose(ClearForceDeleteData, inputs.to_h)
|
compose(RestoreStatusesBeforeForceDelete, inputs.to_h)
|
||||||
compose(NotifyRegistrar, inputs.to_h)
|
compose(ClearForceDeleteData, inputs.to_h)
|
||||||
|
|
||||||
|
# Save the domain once with all accumulated changes
|
||||||
|
# This will create a single PaperTrail version
|
||||||
|
domain.save(validate: false)
|
||||||
|
|
||||||
|
compose(NotifyRegistrar, inputs.to_h)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,7 +7,6 @@ module Domains
|
||||||
domain.force_delete_start = nil
|
domain.force_delete_start = nil
|
||||||
domain.status_notes[DomainStatus::FORCE_DELETE] = nil
|
domain.status_notes[DomainStatus::FORCE_DELETE] = nil
|
||||||
domain.skip_whois_record_update = false
|
domain.skip_whois_record_update = false
|
||||||
domain.save(validate: false)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -19,7 +19,6 @@ module Domains
|
||||||
reason: domain.status_notes[DomainStatus::FORCE_DELETE],
|
reason: domain.status_notes[DomainStatus::FORCE_DELETE],
|
||||||
date: Time.zone.now
|
date: Time.zone.now
|
||||||
}
|
}
|
||||||
domain.save(validate: false)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -9,7 +9,6 @@ module Domains
|
||||||
domain.force_delete_domain_statuses_history = nil
|
domain.force_delete_domain_statuses_history = nil
|
||||||
domain.admin_store_statuses_history = nil
|
domain.admin_store_statuses_history = nil
|
||||||
domain.skip_whois_record_update = true
|
domain.skip_whois_record_update = true
|
||||||
domain.save(validate: false)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue