X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6386f2aca83b477210bda19a3284ea31463d2efc..d3cb9460f0a30f9602508bed7507c906b8a6d91d:/services/api/app/models/collection.rb diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb index 84101ffdd4..accd2cc62c 100644 --- a/services/api/app/models/collection.rb +++ b/services/api/app/models/collection.rb @@ -10,6 +10,9 @@ class Collection < ArvadosModel before_validation :set_portable_data_hash validate :ensure_hash_matches_manifest_text + # Query only undeleted collections by default. + default_scope where("expires_at IS NULL or expires_at > CURRENT_TIMESTAMP") + api_accessible :user, extend: :common do |t| t.add :name t.add :description