X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9c656c55fe63a22b075223fe7f295e7e21e18b8c..2508b089d2369bf57811f9f96c14c2ee22dd664f:/apps/workbench/app/controllers/trash_items_controller.rb diff --git a/apps/workbench/app/controllers/trash_items_controller.rb b/apps/workbench/app/controllers/trash_items_controller.rb index 12ef20aa66..d8f7ae62c8 100644 --- a/apps/workbench/app/controllers/trash_items_controller.rb +++ b/apps/workbench/app/controllers/trash_items_controller.rb @@ -95,12 +95,12 @@ class TrashItemsController < ApplicationController owner_uuids = @objects.collect(&:owner_uuid).uniq @owners = {} @not_trashed = {} - Group.filter([["uuid", "in", owner_uuids]]).with_count("none").include_trash(true).each do |grp| - @owners[grp.uuid] = grp - end - User.filter([["uuid", "in", owner_uuids]]).with_count("none").include_trash(true).each do |grp| - @owners[grp.uuid] = grp - @not_trashed[grp.uuid] = true + [Group, User].each do |owner_class| + owner_class.filter([["uuid", "in", owner_uuids]]).with_count("none") + .include_trash(true).fetch_multiple_pages(false) + .each do |owner| + @owners[owner.uuid] = owner + end end Group.filter([["uuid", "in", owner_uuids]]).with_count("none").select([:uuid]).each do |grp| @not_trashed[grp.uuid] = true