[ARVADOS] updated: cbe594f580c26381d786d7b43d5227eb1d12620d
git at public.curoverse.com
git at public.curoverse.com
Tue Aug 19 13:19:55 EDT 2014
Summary of changes:
.../arvados/v1/collections_controller.rb | 25 +++++-----------------
services/api/test/unit/group_test.rb | 1 -
2 files changed, 5 insertions(+), 21 deletions(-)
via cbe594f580c26381d786d7b43d5227eb1d12620d (commit)
from b1942917bca8caf9e1b693c933d88d4f1aa9a264 (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 cbe594f580c26381d786d7b43d5227eb1d12620d
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Tue Aug 19 13:19:52 2014 -0400
3036: Fix merge mistakes in collection_controller.
diff --git a/services/api/app/controllers/arvados/v1/collections_controller.rb b/services/api/app/controllers/arvados/v1/collections_controller.rb
index 6b2bd64..77bef08 100644
--- a/services/api/app/controllers/arvados/v1/collections_controller.rb
+++ b/services/api/app/controllers/arvados/v1/collections_controller.rb
@@ -65,7 +65,11 @@ class Arvados::V1::CollectionsController < ApplicationController
def show
sign_manifests(@object[:manifest_text])
- super
+ if @object.is_a? Collection
+ render json: @object.as_api_response
+ else
+ render json: @object
+ end
end
def index
@@ -211,25 +215,6 @@ class Arvados::V1::CollectionsController < ApplicationController
super
end
- def find_object_by_uuid
- super
- if !@object and !params[:uuid].match(/^[0-9a-f]+\+\d+$/)
- # Normalize the given uuid and search again.
- hash_part = params[:uuid].match(/^([0-9a-f]*)/)[1]
- collection = Collection.where('uuid like ?', hash_part + '+%').first
- if collection
- # We know the collection exists, and what its real uuid is in
- # the database. Now, throw out @objects and repeat the usual
- # lookup procedure. (Returning the collection at this point
- # would bypass permission checks.)
- @objects = nil
- @where = { uuid: collection.uuid }
- find_objects_for_index
- @object = @objects.first
- end
- end
- end
-
def munge_manifest_locators(manifest, &block)
self.class.munge_manifest_locators(manifest, &block)
end
diff --git a/services/api/test/unit/group_test.rb b/services/api/test/unit/group_test.rb
index 8c40d3a..9e0e4fc 100644
--- a/services/api/test/unit/group_test.rb
+++ b/services/api/test/unit/group_test.rb
@@ -14,7 +14,6 @@ class GroupTest < ActiveSupport::TestCase
# Use the group as the owner of a new object
s = Specimen.
create(owner_uuid: groups(:bad_group_has_ownership_cycle_b).uuid)
- puts s.errors.messages
assert s.valid?, "ownership should pass validation #{s.errors.messages}"
assert_equal false, s.save, "should not save object with #{g.uuid} as owner"
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list