Fix WHOIS generation for domains at auction

This commit is contained in:
Artur Beljajev 2019-03-12 19:46:05 +02:00
parent 98c415f672
commit 1f70df9348

View file

@ -8,6 +8,10 @@ module Whois
def self.refresh(domain_name)
if domain_name.at_auction?
# Remove original record since `Domain#update_whois_record` callback is disabled when
# domain is at auction
find_by(name: domain_name.to_s).try(:destroy!)
create!(name: domain_name, json: { name: domain_name.to_s,
status: 'AtAuction',
disclaimer: disclaimer })