[ARVADOS] created: 8afd22506e81598bd3c8317e1c33d3f56770693c

git at public.curoverse.com git at public.curoverse.com
Fri Aug 29 10:17:15 EDT 2014


        at  8afd22506e81598bd3c8317e1c33d3f56770693c (commit)


commit 8afd22506e81598bd3c8317e1c33d3f56770693c
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Fri Aug 29 10:17:10 2014 -0400

    3763: Workbench will not send attributes to API server that are nil and not
    changed.

diff --git a/apps/workbench/app/models/arvados_base.rb b/apps/workbench/app/models/arvados_base.rb
index 7e45ad7..083db91 100644
--- a/apps/workbench/app/models/arvados_base.rb
+++ b/apps/workbench/app/models/arvados_base.rb
@@ -167,7 +167,9 @@ class ArvadosBase < ActiveRecord::Base
   def save
     obdata = {}
     self.class.columns.each do |col|
-      obdata[col.name.to_sym] = self.send(col.name.to_sym)
+      unless self.send(col.name.to_sym).nil? and !self.changed.include?(col.name)
+          obdata[col.name.to_sym] = self.send(col.name.to_sym)
+      end
     end
     obdata.delete :id
     postdata = { self.class.to_s.underscore => obdata }

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list