X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/0b90a6ee86fdfa5b2b8cb51d66d70cef00dc6800..1d922bf219f74efcd5fda01ed127f7ccae0790c4:/services/api/app/models/collection.rb diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb index 649e0f5d09..99933ba7e7 100644 --- a/services/api/app/models/collection.rb +++ b/services/api/app/models/collection.rb @@ -28,6 +28,7 @@ class Collection < ArvadosModel before_validation :check_signatures before_validation :strip_signatures_and_update_replication_confirmed before_validation :name_null_if_empty + validate :ensure_filesystem_compatible_name validate :ensure_pdh_matches_manifest_text validate :ensure_storage_classes_desired_is_not_empty validate :ensure_storage_classes_contain_non_empty_strings @@ -489,17 +490,13 @@ class Collection < ArvadosModel [c.portable_data_hash, c] }] - puts "mg #{migrated_collections} #{collections}" - collections.map { |c| # Check if the listed image is compatible first, if not, then try the # migration link. manifest = Keep::Manifest.new(c.manifest_text) - puts "m1 #{manifest.exact_file_count?(1)} #{manifest.files[0][1]} #{pattern}" if manifest.exact_file_count?(1) and manifest.files[0][1] =~ pattern c elsif m = migrated_collections[migrations[c.portable_data_hash]] - puts "m2 #{manifest.exact_file_count?(1)} #{manifest.files[0][1]} #{pattern}" manifest = Keep::Manifest.new(m.manifest_text) if manifest.exact_file_count?(1) and manifest.files[0][1] =~ pattern m