Merge branch 'master' into 3036-collection-uuids
[arvados.git] / services / api / app / controllers / arvados / v1 / jobs_controller.rb
index 69778293a4096138cba2607599a2c9d47efafe6b..5045e078c358d3bd1352721c425063d92f862047 100644 (file)
@@ -71,7 +71,7 @@ class Arvados::V1::JobsController < ApplicationController
             # We'll use this if we don't find a job that has completed
             incomplete_job ||= j
           else
-            if Collection.readable_by(current_user).find_by_uuid(j.output)
+            if Collection.readable_by(current_user).find_by_portable_data_hash(j.output)
               # Record the first job in the list
               if !@object
                 @object = j
@@ -214,7 +214,9 @@ class Arvados::V1::JobsController < ApplicationController
         search_list = filter[2].is_a?(Enumerable) ? filter[2] : [filter[2]]
         filter[2] = search_list.flat_map do |search_term|
           image_search, image_tag = search_term.split(':', 2)
-          Collection.uuids_for_docker_image(image_search, image_tag, @read_users)
+          Collection.uuids_for_docker_image(image_search, image_tag, @read_users).map do |uuid|
+            Collection.find_by_uuid(uuid).portable_data_hash
+          end
         end
         true
       else