bug #3309: OpenNebula.systems support does not work with an empty issue list

This commit is contained in:
Daniel Molina committed 2014-11-11 12:39:08 +01:00
1 parent 40626344fc
commit f495cdf488
1 file changed
+4 -1
+4 -1
View File
@@ -122,10 +122,13 @@ get '/support/request' do
pending_requests = 0
one_zrequests = {
"REQUEST_POOL" => {
"REQUEST" => []
}
}
if zrequests.size > 0
one_zrequests["REQUEST_POOL"]["REQUEST"] = []
end
zrequests.each { |zrequest|
if zrequest.status == "pending"
pending_requests += 1