mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 08:52:04 +02:00
Allow punycode domains in bulk ns change domain scope
This commit is contained in:
parent
0e120d4992
commit
8bb0fd80d1
3 changed files with 10 additions and 7 deletions
|
@ -148,10 +148,12 @@ class Registrar < ApplicationRecord
|
|||
failed_list = []
|
||||
|
||||
nameservers.where(hostname: hostname).find_each do |origin|
|
||||
next unless domains.include?(origin.domain.name) || domains.empty?
|
||||
idn = origin.domain.name
|
||||
puny = origin.domain.name_puny
|
||||
next unless domains.include?(idn) || domains.include?(puny) || domains.empty?
|
||||
|
||||
if origin.domain.nameservers.where(hostname: new_attributes[:hostname]).any?
|
||||
failed_list << origin.domain.name
|
||||
failed_list << idn
|
||||
next
|
||||
end
|
||||
|
||||
|
@ -160,7 +162,7 @@ class Registrar < ApplicationRecord
|
|||
new_nameserver.attributes = new_attributes
|
||||
new_nameserver.save!
|
||||
|
||||
domain_list << origin.domain.name
|
||||
domain_list << idn
|
||||
|
||||
origin.destroy!
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue