Merge pull request #1784 from internetee/1139-fix-whois-for-domain-release

Fix Whois record updating for domain release
This commit is contained in:
Timo Võhmar 2021-01-28 09:24:17 +02:00 committed by GitHub
commit 8826c8052f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 53 additions and 10 deletions

View file

@ -39,13 +39,15 @@ module Concerns
def release
if release_to_auction
transaction do
domain_name.sell_at_auction if domain_name.auctionable?
destroy!
registrar.notifications.create!(text: "#{I18n.t(:domain_deleted)}: #{name}",
attached_obj_id: id,
attached_obj_type: self.class)
end
ToStdout.msg 'Destroying domain'
destroy!
ToStdout.msg "Checking if domain_name is auctionable: #{domain_name.auctionable?}"
domain_name.sell_at_auction if domain_name.auctionable?
ToStdout.msg 'Sending registrar notification'
registrar.notifications.create!(text: "#{I18n.t(:domain_deleted)}: #{name}",
attached_obj_id: id,
attached_obj_type: self.class)
else
discard
end