7709: Merge branch 'master' into 7709-api-rails4
[arvados.git] / services / api / app / controllers / application_controller.rb
index 6ba334fc85a7fc489fe5f9fe5be645fdfb2fb2a3..831bcceee7034a72c5ea7bd22720aef035cbcd33 100644 (file)
@@ -83,7 +83,9 @@ class ApplicationController < ActionController::Base
   end
 
   def index
-    @objects.uniq!(&:id) if @select.nil? or @select.include? "id"
+    if @select.nil? || @select.include?("id")
+      @objects = @objects.uniq(&:id)
+    end
     if params[:eager] and params[:eager] != '0' and params[:eager] != 0 and params[:eager] != ''
       @objects.each(&:eager_load_associations)
     end