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