[ARVADOS] created: 15696397596dfebd42ebb415772237394ceca978
git at public.curoverse.com
git at public.curoverse.com
Wed Aug 19 17:35:15 EDT 2015
at 15696397596dfebd42ebb415772237394ceca978 (commit)
commit 15696397596dfebd42ebb415772237394ceca978
Author: Tom Clegg <tom at curoverse.com>
Date: Wed Aug 19 17:34:20 2015 -0400
6640: dup all_projects when reusing it for find_objects_for_index, to
avoid infecting the projects dropdown menu with this request's filter
params.
diff --git a/apps/workbench/app/controllers/projects_controller.rb b/apps/workbench/app/controllers/projects_controller.rb
index 44c8518..e49ed1f 100644
--- a/apps/workbench/app/controllers/projects_controller.rb
+++ b/apps/workbench/app/controllers/projects_controller.rb
@@ -184,7 +184,11 @@ class ProjectsController < ApplicationController
end
def find_objects_for_index
- @objects = all_projects
+ # We can use the all_projects helper, but we have to dup the
+ # result -- otherwise, when we apply our per-request filters and
+ # limits, they will infect the @all_projects cache too (see
+ # #6640).
+ @objects = all_projects.dup
super
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list