diff --git a/app/models/dispute.rb b/app/models/dispute.rb index b80a33e9c..a21ef28f7 100644 --- a/app/models/dispute.rb +++ b/app/models/dispute.rb @@ -55,8 +55,16 @@ class Dispute < ApplicationRecord return false unless update(closed: true) return if Dispute.active.where(domain_name: domain_name).any? - whois_record = Whois::Record.find_or_initialize_by(name: domain_name) - return true if remove_whois_data(whois_record) + domain = DNS::DomainName.new(domain_name) + if domain.available? && domain.auctionable? + domain.sell_at_auction + return true + else + whois_record = Whois::Record.find_or_initialize_by(name: domain_name) + return true if remove_whois_data(whois_record) + end + + false end def remove_whois_data(record) diff --git a/app/models/dns/domain_name.rb b/app/models/dns/domain_name.rb index c1af4d5e7..7df38341c 100644 --- a/app/models/dns/domain_name.rb +++ b/app/models/dns/domain_name.rb @@ -29,6 +29,8 @@ module DNS :at_auction elsif awaiting_payment? :awaiting_payment + elsif disputed? + :disputed end end