[ARVADOS] created: 1.3.0-2132-gb74246573

Git user git at public.arvados.org
Thu Feb 6 16:46:35 UTC 2020


        at  b742465734fe980578e106e6b035ca9d0aebf02e (commit)


commit b742465734fe980578e106e6b035ca9d0aebf02e
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Thu Feb 6 11:42:59 2020 -0500

    16136: Prioritize 'Function' over 'Value' and ignore null
    
    Because arvados-server config-dump will emit "Value: null" even if the
    original config file didn't provide it.
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb
index 99933ba7e..caac5611e 100644
--- a/services/api/app/models/collection.rb
+++ b/services/api/app/models/collection.rb
@@ -624,10 +624,10 @@ class Collection < ArvadosModel
       return
     end
     (managed_props.keys - self.properties.keys).each do |key|
-      if managed_props[key].has_key?('Value')
-        self.properties[key] = managed_props[key]['Value']
-      elsif managed_props[key]['Function'].andand == 'original_owner'
+      if managed_props[key]['Function'] == 'original_owner'
         self.properties[key] = self.user_owner_uuid
+      elsif managed_props[key]['Value']
+        self.properties[key] = managed_props[key]['Value']
       else
         logger.warn "Unidentified default property definition '#{key}': #{managed_props[key].inspect}"
       end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list