X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a72205728f94f5261b657766e01f5767dc15d4b5..2b27132d13fd72f29dbab2297f0d2dc1c110eed1:/services/api/app/models/collection.rb diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb index 29e57254ff..b45c178fb4 100644 --- a/services/api/app/models/collection.rb +++ b/services/api/app/models/collection.rb @@ -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_format: true) 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(":"))