X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7fb83a3380e62721801a4980c48ba78208c7b2e2..784e112f3fcad487c9f359413fb0dcd8b09c3edb:/services/api/app/controllers/application_controller.rb diff --git a/services/api/app/controllers/application_controller.rb b/services/api/app/controllers/application_controller.rb index 9a54abe4d0..fe5598e0dc 100644 --- a/services/api/app/controllers/application_controller.rb +++ b/services/api/app/controllers/application_controller.rb @@ -130,14 +130,17 @@ class ApplicationController < ActionController::Base apply_where_limit_order_params end - def apply_where_limit_order_params - ar_table_name = @objects.table_name - - ft = record_filters @filters, ar_table_name + def apply_filters + ft = record_filters @filters, @objects.table_name if ft[:cond_out].any? @objects = @objects.where(ft[:cond_out].join(' AND '), *ft[:param_out]) end + end + def apply_where_limit_order_params + apply_filters + + ar_table_name = @objects.table_name if @where.is_a? Hash and @where.any? conditions = ['1=1'] @where.each do |attr,value|