X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/736a629e16c388a5afecc97268bd7eadfd7ce3c2..607fe087f6167061714a524dd53cbbc21b974973:/services/api/app/controllers/arvados/v1/nodes_controller.rb diff --git a/services/api/app/controllers/arvados/v1/nodes_controller.rb b/services/api/app/controllers/arvados/v1/nodes_controller.rb index b308c18329..2f6c6504b7 100644 --- a/services/api/app/controllers/arvados/v1/nodes_controller.rb +++ b/services/api/app/controllers/arvados/v1/nodes_controller.rb @@ -6,8 +6,8 @@ class Arvados::V1::NodesController < ApplicationController include DbCurrentTime def update - if resource_attrs[:job_uuid] - @object.job_readable = readable_job_uuids(resource_attrs[:job_uuid]).any? + if resource_attrs[:job_uuid].is_a? String + @object.job_readable = readable_job_uuids([resource_attrs[:job_uuid]]).any? end super end @@ -57,7 +57,7 @@ class Arvados::V1::NodesController < ApplicationController protected - def readable_job_uuids(*uuids) + def readable_job_uuids(uuids) Job.readable_by(*@read_users).select(:uuid).where(uuid: uuids).map(&:uuid) end end