mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 19:20:37 +02:00
Delete original WhoisRecord after domain deletion
This commit is contained in:
parent
0c5ef72c7d
commit
b60a7e571f
3 changed files with 16 additions and 12 deletions
|
@ -39,16 +39,16 @@ module Concerns
|
|||
|
||||
def release
|
||||
if release_to_auction
|
||||
with_lock do
|
||||
to_stdout "Checking if domain_name is auctionable: #{domain_name.auctionable?}"
|
||||
domain_name.sell_at_auction if domain_name.auctionable?
|
||||
to_stdout 'Destroying domain'
|
||||
destroy!
|
||||
to_stdout 'Sending registrar notification'
|
||||
registrar.notifications.create!(text: "#{I18n.t(:domain_deleted)}: #{name}",
|
||||
attached_obj_id: id,
|
||||
attached_obj_type: self.class)
|
||||
end
|
||||
lock!
|
||||
to_stdout 'Destroying domain'
|
||||
destroy!
|
||||
to_stdout "Checking if domain_name is auctionable: #{domain_name.auctionable?}"
|
||||
domain_name.sell_at_auction if domain_name.auctionable?
|
||||
|
||||
to_stdout 'Sending registrar notification'
|
||||
registrar.notifications.create!(text: "#{I18n.t(:domain_deleted)}: #{name}",
|
||||
attached_obj_id: id,
|
||||
attached_obj_type: self.class)
|
||||
else
|
||||
discard
|
||||
end
|
||||
|
|
|
@ -78,7 +78,7 @@ class Domain < ApplicationRecord
|
|||
true
|
||||
end
|
||||
|
||||
after_commit :update_whois_record, unless: -> { domain_name.at_auction? }
|
||||
after_commit :update_whois_record
|
||||
|
||||
after_create :update_reserved_domains
|
||||
def update_reserved_domains
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue