From 1f70df9348a4fa742b9a039326493f4a076af6bd Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Tue, 12 Mar 2019 19:46:05 +0200 Subject: [PATCH] Fix WHOIS generation for domains at auction --- app/models/whois/record.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/whois/record.rb b/app/models/whois/record.rb index 943ae8b5a..5f6279247 100644 --- a/app/models/whois/record.rb +++ b/app/models/whois/record.rb @@ -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 })