1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-02-15 05:57:23 +03:00

F #1414: fix bug related with older context packages (#3287)

This commit is contained in:
Alejandro Huertas Herrero 2019-04-29 11:41:27 +02:00 committed by Ruben S. Montero
parent df4b534cf6
commit 595c1c9df7

View File

@ -325,9 +325,15 @@ helpers do
# @param params [Object] HTTP request parameters
def update(object, params)
attr = params[:data]
type = params[:type].to_i
type = params[:type]
type = 1 if type.nil?
if type.nil?
type = 1
else
type = type.to_i
end
attr = request.body.read if attr.nil?
if type == 1
error = "cannot be modified"