Fix WHOIS update for a domain being sent to an auction

This commit is contained in:
Artur Beljajev 2019-03-08 12:38:49 +02:00
parent 85ba5c066a
commit 98c415f672
3 changed files with 18 additions and 3 deletions

View file

@ -35,8 +35,10 @@ module Concerns
def release
if release_to_auction
domain_name.sell_at_auction
destroy!
transaction do
domain_name.sell_at_auction
destroy!
end
else
discard
end

View file

@ -93,7 +93,7 @@ class Domain < ActiveRecord::Base
true
end
after_commit :update_whois_record
after_commit :update_whois_record, unless: 'domain_name.at_auction?'
after_create :update_reserved_domains
def update_reserved_domains