mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 13:15:40 +02:00
Merge pull request #1854 from internetee/optimize-whois-record-delete-sql
Optimize WHOIS record destroy SQL check
This commit is contained in:
commit
752bdedf1e
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