Merge branch 'master' into 10231-keep-cache-runtime-constraints
[arvados.git] / services / api / app / models / collection.rb
index 248c8b98245bd5628096fa60ba0f3ed2b7ea66e9..8579509de70e9eff1c46d25563ca239fcf9dff8d 100644 (file)
@@ -46,6 +46,10 @@ class Collection < ArvadosModel
                 )
   end
 
+  def self.ignored_select_attributes
+    super + ["updated_at", "file_names"]
+  end
+
   FILE_TOKEN = /^[[:digit:]]+:[[:digit:]]+:/
   def check_signatures
     return false if self.manifest_text.nil?
@@ -310,7 +314,7 @@ class Collection < ArvadosModel
         # looks like a saved Docker image.
         manifest = Keep::Manifest.new(coll_match.manifest_text)
         if manifest.exact_file_count?(1) and
-            (manifest.files[0][1] =~ /^[0-9A-Fa-f]{64}\.tar$/)
+            (manifest.files[0][1] =~ /^(sha256:)?[0-9A-Fa-f]{64}\.tar$/)
           return [coll_match]
         end
       end
@@ -356,12 +360,6 @@ class Collection < ArvadosModel
     super - ["manifest_text"]
   end
 
-  def logged_attributes
-    attrs = attributes.dup
-    attrs.delete('manifest_text')
-    attrs
-  end
-
   protected
   def portable_manifest_text
     self.class.munge_manifest_locators(manifest_text) do |match|