Skip to content

Commit

Permalink
fix attempt for context issue with default_get (when creating the tes…
Browse files Browse the repository at this point in the history
…t db)
  • Loading branch information
rvalyi committed Dec 9, 2013
1 parent 8ac05d9 commit c192f3c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/ooor/services.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def object_service(service, obj, method, *args)
else
req.url '/web/dataset/call_kw'
params = {"jsonrpc"=>"2.0","method"=>"call","params"=>{"model"=>obj, "method"=> method, "kwargs"=>{}, "args"=>args, "context"=>context, "session_id" => @connection.session_id}, "id"=>"r42"}
params["params"]["kwargs"] = {"context"=>context} if args[0].is_a?(Array) && args.size == 1 && args[0].any? {|e| !e.is_a?(Integer)}
end
req.headers['Content-Type'] = 'application/json'
req.body = params.to_json
Expand Down

0 comments on commit c192f3c

Please sign in to comment.