Skip to content

Commit

Permalink
F #1414: fix bug related with older context packages (#3287)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro Huertas Herrero authored and rsmontero committed Apr 29, 2019
1 parent df4b534 commit 595c1c9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/onegate/onegate-server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,15 @@ def check_vm_in_service(requested_vm_id, service_id, client)
# @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"
Expand Down

0 comments on commit 595c1c9

Please sign in to comment.