closes #3821
[arvados.git] / services / api / app / models / collection.rb
index 29e57254ff262414005ab7487937b84214a64a05..b45c178fb498af1eb588c55982ad38f2bfdeb70e 100644 (file)
@@ -163,7 +163,7 @@ class Collection < ArvadosModel
       false
     elsif portable_data_hash[0..31] != computed_pdh[0..31]
       errors.add(:portable_data_hash,
-                 "does not match computed hash #{computed_pdh}")
+                 "'#{portable_data_hash}' does not match computed hash '#{computed_pdh}'")
       false
     else
       # Ignore the client-provided size part: always store
@@ -362,7 +362,7 @@ class Collection < ArvadosModel
   # Rails.configuration.docker_image_formats.  Will follow
   # 'docker_image_migration' links if search_term resolves to an incompatible
   # image, but an equivalent compatible image is available.
-  def self.find_all_for_docker_image(search_term, search_tag=nil, readers=nil, filter_compatible_format=true)
+  def self.find_all_for_docker_image(search_term, search_tag=nil, readers=nil, filter_compatible_formattrue)
     readers ||= [Thread.current[:user]]
     base_search = Link.
       readable_by(*readers).
@@ -386,9 +386,7 @@ class Collection < ArvadosModel
     if loc = Keep::Locator.parse(search_term)
       loc.strip_hints!
       coll_match = readable_by(*readers).where(portable_data_hash: loc.to_s).limit(1)
-      if compatible_img = get_compatible_images(readers, pattern, coll_match)
-        return compatible_img
-      end
+      return get_compatible_images(readers, pattern, coll_match)
     end
 
     if search_tag.nil? and (n = search_term.index(":"))