mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 20:18:22 +02:00
Story#112965483 - skip removing whoises for reserved and blocked domains if domain exists
This commit is contained in:
parent
3e929a895c
commit
2fea2975f6
2 changed files with 4 additions and 0 deletions
|
@ -48,6 +48,8 @@ class BlockedDomain < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def remove_data
|
def remove_data
|
||||||
|
next if Domain.where(name: name).any?
|
||||||
|
|
||||||
Whois::Record.where(name: name).delete_all
|
Whois::Record.where(name: name).delete_all
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -59,6 +59,8 @@ class ReservedDomain < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def remove_data
|
def remove_data
|
||||||
|
next if Domain.where(name: name).any?
|
||||||
|
|
||||||
Whois::Record.where(name: name).delete_all
|
Whois::Record.where(name: name).delete_all
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue