1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

bug #2906: create arrays for repeated template variables

This commit is contained in:
Javi Fontan 2014-05-13 15:10:25 +02:00
parent 699a725fe6
commit 571a74aba8

View File

@ -72,7 +72,12 @@ module OpenNebula
if @levels[@current].empty?
@levels[@current-1][name] = @value || {}
else
@levels[@current-1][name] = @levels[@current]
if @levels[@current-1][name]
@levels[@current-1][name] = [@levels[@current-1][name], @levels[@current]].flatten
else
@levels[@current-1][name] = @levels[@current]
end
@levels[@current] = Hash.new
end