Merge branch '18321-gpu-instancetype' refs #18321
[arvados.git] / services / api / app / models / container_request.rb
index 17247246c0c8f54d93e7b8584342fe2c19711084..e54ebf9366631ec2d0420cd1fddea3e30c26d0ec 100644 (file)
@@ -417,13 +417,13 @@ class ContainerRequest < ArvadosModel
     if self.new_record? || self.state_was == Uncommitted
       # Allow create-and-commit in a single operation.
       permitted.push(*AttrsPermittedBeforeCommit)
-    elsif mounts_changed? && mounts_was.keys == mounts.keys
+    elsif mounts_changed? && mounts_was.keys.sort == mounts.keys.sort
       # Ignore the updated mounts if the only changes are default/zero
       # values as added by controller, see 17774
       only_defaults = true
       mounts.each do |path, mount|
         (mount.to_a - mounts_was[path].to_a).each do |k, v|
-          if !["", false, nil].index(v)
+          if ![0, "", false, nil].index(v)
             only_defaults = false
           end
         end