Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>
def resource_attrs
return @attrs if @attrs
@attrs = params[resource_name]
- if @attrs.is_a? String
+ if @attrs.nil?
+ @attrs = {}
+ elsif @attrs.is_a? String
@attrs = Oj.strict_load @attrs, symbol_keys: true
end
unless [Hash, ActionController::Parameters].include? @attrs.class
def load_where_param
if params[:where].nil? or params[:where] == ""
@where = {}
- elsif params[:where].is_a? Hash
+ elsif [Hash, ActionController::Parameters].include? params[:where].class
@where = params[:where]
elsif params[:where].is_a? String
begin