mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[dreamhost|dns] Do not add duplicated zones to the Zones collection
This commit is contained in:
parent
19c8c4d877
commit
c38aa22e3a
1 changed files with 5 additions and 1 deletions
|
@ -18,8 +18,12 @@ module Fog
|
|||
def all
|
||||
clear
|
||||
zones = []
|
||||
zones_added = []
|
||||
service.records.each do |r|
|
||||
zones << { :id => r.zone, :domain => r.zone }
|
||||
unless zones_added.include?(r.zone)
|
||||
zones << { :id => r.zone, :domain => r.zone }
|
||||
zones_added << r.zone
|
||||
end
|
||||
end
|
||||
load(zones)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue