X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/be76fcdd9aa19fbf8982df2543685816a4afb1e0..2204a8d9305c85d2f7d65621a66443e7104c5f6b:/services/api/app/models/container.rb?ds=sidebyside diff --git a/services/api/app/models/container.rb b/services/api/app/models/container.rb index b3739da9cf..edcb8501a4 100644 --- a/services/api/app/models/container.rb +++ b/services/api/app/models/container.rb @@ -437,12 +437,10 @@ class Container < ArvadosModel # that a container cannot "claim" a collection that it doesn't otherwise # have access to just by setting the output field to the collection PDH. if output_changed? - c = Collection.unscoped do - Collection. - readable_by(current_user). + c = Collection. + readable_by(current_user, {include_trash: true}). where(portable_data_hash: self.output). first - end if !c errors.add :output, "collection must exist and be readable by current user." end