mirror of
https://github.com/internetee/registry.git
synced 2025-06-05 20:27:30 +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
|
||||
|
||||
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
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue