mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 01:36:02 +02:00
Turn off removing auctioned Whois::Record
This commit is contained in:
parent
1d5c46e6a0
commit
59ddc5acce
2 changed files with 7 additions and 1 deletions
|
@ -2,6 +2,12 @@ module Whois
|
||||||
class Record < Whois::Server
|
class Record < Whois::Server
|
||||||
self.table_name = 'whois_records'
|
self.table_name = 'whois_records'
|
||||||
|
|
||||||
|
def self.without_auctions
|
||||||
|
ids = Whois::Record.all.select { |record| Auction.where(domain: record.name).blank? }
|
||||||
|
.pluck(:id)
|
||||||
|
Whois::Record.where(id: ids)
|
||||||
|
end
|
||||||
|
|
||||||
def self.disclaimer
|
def self.disclaimer
|
||||||
Setting.registry_whois_disclaimer
|
Setting.registry_whois_disclaimer
|
||||||
end
|
end
|
||||||
|
|
|
@ -97,7 +97,7 @@ class WhoisRecord < ApplicationRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy_whois_record
|
def destroy_whois_record
|
||||||
Whois::Record.where(name: name).delete_all
|
Whois::Record.without_auctions.where(name: name).delete_all
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue