15275: Saves snapshot as system user instead of assigning a signed manifest to it
authorLucas Di Pentima <ldipentima@veritasgenetics.com>
Thu, 23 May 2019 23:07:13 +0000 (20:07 -0300)
committerLucas Di Pentima <ldipentima@veritasgenetics.com>
Fri, 24 May 2019 15:49:51 +0000 (12:49 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>

services/api/app/models/collection.rb

index 22c260356702dcafb9f6b80dafe3532172b1b23a..dec5f482f059868ea2b07670c3d1ef7cc6f9fc09 100644 (file)
@@ -281,8 +281,11 @@ class Collection < ArvadosModel
       sync_past_versions if syncable_updates.any?
       if snapshot
         snapshot.attributes = self.syncable_updates
-        snapshot.manifest_text = snapshot.signed_manifest_text
-        snapshot.save
+        leave_modified_by_user_alone do
+          act_as_system_user do
+            snapshot.save
+          end
+        end
       end
     end
   end