Fixes API server to return default columns for collections
authorJoshua C. Randall <jcrandall@alum.mit.edu>
Sat, 12 Nov 2016 03:57:50 +0000 (03:57 +0000)
committerTom Clegg <tom@curoverse.com>
Sat, 12 Nov 2016 22:43:15 +0000 (17:43 -0500)
Prior to this fix, if a request has a query param `select=`
(as opposed to just omitting `select` entirely), the API
server would return a full set of columns rather than
enforcing its own defaults.

Fixes #10517, assuming this was a bug and not a feature.

services/api/app/controllers/arvados/v1/collections_controller.rb

index 44733cdfb82ff1c21c4ca379a723110ebcaf5721..922cf7dac16b87741013c23e4073d4070a6fbe43 100644 (file)
@@ -182,10 +182,10 @@ class Arvados::V1::CollectionsController < ApplicationController
   protected
 
   def load_limit_offset_order_params *args
+    super
     if action_name == 'index'
       # Omit manifest_text from index results unless expressly selected.
       @select ||= model_class.selectable_attributes - ["manifest_text"]
     end
-    super
   end
 end