[ARVADOS] updated: 796db22b3f3e4bdda6dfa7b660da0e7f75e80c13

Git user git at public.curoverse.com
Tue Oct 11 19:24:21 EDT 2016


Summary of changes:
 apps/workbench/app/controllers/application_controller.rb | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

       via  796db22b3f3e4bdda6dfa7b660da0e7f75e80c13 (commit)
      from  9ec17aceb2d1361f1ae81fed5cd1d4ee1629325e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 796db22b3f3e4bdda6dfa7b660da0e7f75e80c13
Author: radhika <radhika at curoverse.com>
Date:   Tue Oct 11 19:07:38 2016 -0400

    10144: limit find_object_by_uuid update to the case where find is used; this will ensure that the object is not fetch again when show is used.

diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index 3591199..f68250b 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -529,18 +529,14 @@ class ApplicationController < ActionController::Base
       elsif params[:uuid].nil? or params[:uuid].empty?
         @object = nil
       elsif not params[:uuid].is_a?(String)
-        @object = object_for_dataclass(model_class, params[:uuid])
+        @object = model_class.where(uuid: params[:uuid]).first
       elsif (model_class != Link and
              resource_class_for_uuid(params[:uuid]) == Link)
         @name_link = Link.find(params[:uuid])
         @object = model_class.find(@name_link.head_uuid)
       else
-        if resource_class_for_uuid(params[:uuid]) == Collection
-          @object = model_class.find(params[:uuid])
-          load_preloaded_objects [@object]
-        else
-          @object = object_for_dataclass(model_class, params[:uuid])
-        end
+        @object = model_class.find(params[:uuid])
+        load_preloaded_objects [@object]
       end
     rescue ArvadosApiClient::NotFoundException, ArvadosApiClient::NotLoggedInException, RuntimeError => error
       if error.is_a?(RuntimeError) and (error.message !~ /^argument to find\(/)

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list