Increase limit for collections controller querying same portable_data_hash as
authorPeter Amstutz <peter.amstutz@curoverse.com>
Thu, 23 Oct 2014 17:53:31 +0000 (13:53 -0400)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Thu, 23 Oct 2014 17:53:31 +0000 (13:53 -0400)
workaround to fix tests, refs #4058, but really needs a proper fix, refs #3400

apps/workbench/app/controllers/collections_controller.rb

index 263f67f94ef7e6f22cc0050d68a7104a96bb712c..4e0008d93cf63887926c7d3ef7907d4f1f377bd3 100644 (file)
@@ -205,7 +205,7 @@ class CollectionsController < ApplicationController
     return super if !@object
     if current_user
       if Keep::Locator.parse params["uuid"]
-        @same_pdh = Collection.filter([["portable_data_hash", "=", @object.portable_data_hash]])
+        @same_pdh = Collection.filter([["portable_data_hash", "=", @object.portable_data_hash]]).limit(1000)
         if @same_pdh.results.size == 1
           redirect_to collection_path(@same_pdh[0]["uuid"])
           return