F #4809: Handle properly if only one server in the zone

This commit is contained in:
Jaime Melis committed 2017-05-16 12:56:18 +02:00
1 parent faa46d9c22
commit cfe3b4153b
1 file changed
+1 -1
+1 -1
View File
@@ -119,7 +119,7 @@ class OneZoneHelper < OpenNebulaHelper::OneHelper
if zone.has_elements?("/ZONE/SERVER_POOL/SERVER")
servers = zone_hash["ZONE"]["SERVER_POOL"]["SERVER"]
servers.each { |s|
[servers].flatten.each { |s|
endpoint = s["ENDPOINT"]
next if endpoint.nil?