X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/cb109bfddd08bd8136b75e90b681e4af3d60ea30..27355f62088566a9388972e128bfb8ba77790e9a:/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 2bf7952dc6..b6816d35c7 100644 --- a/services/api/app/controllers/application_controller.rb +++ b/services/api/app/controllers/application_controller.rb @@ -281,9 +281,9 @@ class ApplicationController < ActionController::Base return if limit_columns.empty? model_class.transaction do limit_query = @objects. - except(:select). + except(:select, :distinct). select("(%s) as read_length" % - limit_columns.map { |s| "octet_length(#{s})" }.join(" + ")) + limit_columns.map { |s| "octet_length(#{model_class.table_name}.#{s})" }.join(" + ")) new_limit = 0 read_total = 0 limit_query.each do |record|