[ARVADOS] created: 0a05151f05de44233d3c6ae0d53ecae2855f5a11
Git user
git at public.curoverse.com
Wed Nov 2 14:43:04 EDT 2016
at 0a05151f05de44233d3c6ae0d53ecae2855f5a11 (commit)
commit 0a05151f05de44233d3c6ae0d53ecae2855f5a11
Author: radhika <radhika at curoverse.com>
Date: Wed Nov 2 14:42:00 2016 -0400
10028: when an "is_a" filter is used while fetching contents, do not search in all "other" types.
diff --git a/services/api/app/controllers/arvados/v1/groups_controller.rb b/services/api/app/controllers/arvados/v1/groups_controller.rb
index 7a5713a..d6adbf0 100644
--- a/services/api/app/controllers/arvados/v1/groups_controller.rb
+++ b/services/api/app/controllers/arvados/v1/groups_controller.rb
@@ -75,7 +75,20 @@ class Arvados::V1::GroupsController < ApplicationController
end
end
+ wanted_klasses = []
+ request_filters.each do |col,op,val|
+ if op == 'is_a'
+ (val.is_a?(Array) ? val : [val]).each do |type|
+ type = type.split('#')[-1]
+ type[0] = type[0].capitalize
+ wanted_klasses << type
+ end
+ end
+ end
+
klasses.each do |klass|
+ next if wanted_klasses.any? and !wanted_klasses.include?(klass.to_s)
+
# If the currently requested orders specifically match the
# table_name for the current klass, apply that order.
# Otherwise, order by recency.
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list