projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
20846: Remove deprecated Random::DEFAULT usage.
[arvados.git]
/
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 7d6e1431ce2f8f26c2a569d4702a14de1d02abe5..d8f7ae62c8591e6a218c659c64de861aafa05456 100644
(file)
--- a/
apps/workbench/app/controllers/trash_items_controller.rb
+++ b/
apps/workbench/app/controllers/trash_items_controller.rb
@@
-78,10
+78,10
@@
class TrashItemsController < ApplicationController
base_search = base_search.filter([["modified_at", "<=", last_mod_at], ["uuid", "not in", last_uuids]])
end
base_search = base_search.filter([["modified_at", "<=", last_mod_at], ["uuid", "not in", last_uuids]])
end
- base_search = base_search.include_trash(true).limit(limit).offset(offset)
+ base_search = base_search.include_trash(true).limit(limit).
with_count("none").
offset(offset)
if params[:filters].andand.length.andand > 0
if params[:filters].andand.length.andand > 0
- tags = Link.filter(params[:filters])
+ tags = Link.filter(params[:filters])
.with_count("none")
tagged = []
if tags.results.length > 0
tagged = query_on.include_trash(true).where(uuid: tags.collect(&:head_uuid))
tagged = []
if tags.results.length > 0
tagged = query_on.include_trash(true).where(uuid: tags.collect(&:head_uuid))
@@
-95,14
+95,14
@@
class TrashItemsController < ApplicationController
owner_uuids = @objects.collect(&:owner_uuid).uniq
@owners = {}
@not_trashed = {}
owner_uuids = @objects.collect(&:owner_uuid).uniq
@owners = {}
@not_trashed = {}
- Group.filter([["uuid", "in", owner_uuids]]).include_trash(true).each do |grp|
- @owners[grp.uuid] = grp
+ [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
end
- User.filter([["uuid", "in", owner_uuids]]).include_trash(true).each do |grp|
- @owners[grp.uuid] = grp
- @not_trashed[grp.uuid] = true
- end
- Group.filter([["uuid", "in", owner_uuids]]).select([:uuid]).each do |grp|
+ Group.filter([["uuid", "in", owner_uuids]]).with_count("none").select([:uuid]).each do |grp|
@not_trashed[grp.uuid] = true
end
else
@not_trashed[grp.uuid] = true
end
else