3021: Use Marshal dump/load to save @old_attributes. Otherwise, hashes
[arvados.git] / services / api / app / models / arvados_model.rb
index 38a46de09acbc7736e320e72ff6d6d2a6be62efc..308da7fa11576acc00066bb47de5592cf2543f96 100644 (file)
@@ -523,8 +523,8 @@ class ArvadosModel < ActiveRecord::Base
   end
 
   def log_start_state
-    @old_attributes = attributes
-    @old_logged_attributes = logged_attributes
+    @old_attributes = Marshal.load(Marshal.dump(attributes))
+    @old_logged_attributes = Marshal.load(Marshal.dump(logged_attributes))
   end
 
   def log_change(event_type)