mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 13:15:40 +02:00
Optimize WHOIS record destroy SQL check
This commit is contained in:
parent
25e0b61a15
commit
06ae9b8e24
1 changed files with 3 additions and 1 deletions
|
@ -97,7 +97,9 @@ class WhoisRecord < ApplicationRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy_whois_record
|
def destroy_whois_record
|
||||||
Whois::Record.without_auctions.where(name: name).delete_all
|
return if Auction.find_by(domain: name).present?
|
||||||
|
|
||||||
|
Whois::Record.where(name: name).delete_all
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue