[ARVADOS] updated: 51c1f780628da8e0839a127963122ebb1b97020b

git at public.curoverse.com git at public.curoverse.com
Fri Jun 13 15:27:36 EDT 2014


Summary of changes:
 services/api/app/models/collection.rb | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

       via  51c1f780628da8e0839a127963122ebb1b97020b (commit)
      from  17c73de66fe0fa797407e824e62d3b8159b8be4b (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 51c1f780628da8e0839a127963122ebb1b97020b
Author: Brett Smith <brett at curoverse.com>
Date:   Fri Jun 13 15:28:36 2014 -0400

    2879: API Docker image search separates searches with or without a tag.

diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb
index bd2fb44..898127b 100644
--- a/services/api/app/models/collection.rb
+++ b/services/api/app/models/collection.rb
@@ -158,10 +158,17 @@ class Collection < ArvadosModel
       return coll
     end
 
-    # Find Collections with matching Docker image repository+tag pairs.
-    repo_matches = base_search.
-      where(links: {link_class: 'docker_image_repo+tag',
-                    name: "#{search_term}:#{search_tag || 'latest'}"})
+    # Find Collections with a matching Docker image repository,
+    # plus the tag pair if provided.
+    if search_tag.nil?
+      repo_matches = base_search.
+        where(links: {link_class: 'docker_image_repository',
+                      name: search_term})
+    else
+      repo_matches = base_search.
+        where(links: {link_class: 'docker_image_repo+tag',
+                      name: "#{search_term}:#{search_tag || 'latest'}"})
+    end
 
     # Find Collections with matching Docker image hashes, unless we're
     # obviously doing a repo+tag search and already found a match that way.

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list