mirror of
https://github.com/internetee/registry.git
synced 2025-08-19 16:04:11 +02:00
Merge branch '109012608-whiteips-import' into staging
This commit is contained in:
commit
025fc4c035
1 changed files with 9 additions and 5 deletions
|
@ -173,11 +173,15 @@ namespace :import do
|
||||||
x.acl.all.each do |y|
|
x.acl.all.each do |y|
|
||||||
next if existing_ips.include?(y.ipaddr)
|
next if existing_ips.include?(y.ipaddr)
|
||||||
if !y.ipaddr.nil? && y.ipaddr != ''
|
if !y.ipaddr.nil? && y.ipaddr != ''
|
||||||
|
|
||||||
|
y.ipaddr.split(',').each do |ip|
|
||||||
ips << WhiteIp.new({
|
ips << WhiteIp.new({
|
||||||
registrar_id: Registrar.find_by(legacy_id: x.try(:id)).try(:id),
|
registrar_id: Registrar.find_by(legacy_id: x.try(:id)).try(:id),
|
||||||
ipv4: y.ipaddr,
|
ipv4: ip,
|
||||||
interfaces: ['api', 'registrar']
|
interfaces: ['api', 'registrar']
|
||||||
})
|
})
|
||||||
|
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue