11629: Fix items_available in groups#contents response.
authorTom Clegg <tom@curoverse.com>
Mon, 8 May 2017 18:17:16 +0000 (14:17 -0400)
committerTom Clegg <tom@curoverse.com>
Mon, 8 May 2017 18:17:16 +0000 (14:17 -0400)
services/api/app/controllers/arvados/v1/groups_controller.rb

index 7b0c0f003719b3b8fe1286da571ff60a7803127f..3bf91c38e4d6533e6d30889a1c1ea7c829c8c492 100644 (file)
@@ -149,8 +149,9 @@ class Arvados::V1::GroupsController < ApplicationController
 
       if klass_object_list[:limit] < klass_limit
         # object_list() had to reduce @limit to comply with
-        # max_index_database_read. We have to stop now.
-        break
+        # max_index_database_read. From now on, we'll do all queries
+        # with limit=0 and just accumulate items_available.
+        limit_all = all_objects.count
       end
     end