[ARVADOS] updated: 2bcd1451cbcad6e96610f0ddfe14a19f8dd4a3ba

Git user git at public.curoverse.com
Thu Aug 18 12:07:17 EDT 2016


Summary of changes:
 services/api/app/models/arvados_model.rb | 6 +++++-
 services/api/app/models/collection.rb    | 4 ++++
 2 files changed, 9 insertions(+), 1 deletion(-)

       via  2bcd1451cbcad6e96610f0ddfe14a19f8dd4a3ba (commit)
      from  06a58dd08e813bebfc17f72da41488d8e0ae5dd5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 2bcd1451cbcad6e96610f0ddfe14a19f8dd4a3ba
Author: Lucas Di Pentima <lucas at curoverse.com>
Date:   Thu Aug 18 13:06:01 2016 -0300

    9333: Adding collection model specific sttributes to be ignored on the validation mechanism to fix workbench integration test failures

diff --git a/services/api/app/models/arvados_model.rb b/services/api/app/models/arvados_model.rb
index 5533143..a6672c4 100644
--- a/services/api/app/models/arvados_model.rb
+++ b/services/api/app/models/arvados_model.rb
@@ -104,6 +104,10 @@ class ArvadosModel < ActiveRecord::Base
     api_column_map
   end
 
+  def self.ignored_select_attributes
+    ["href", "kind", "etag"]
+  end
+
   def self.columns_for_attributes(select_attributes)
     if select_attributes.empty?
       raise ArgumentError.new("Attribute selection list cannot be empty")
@@ -111,7 +115,7 @@ class ArvadosModel < ActiveRecord::Base
     api_column_map = attributes_required_columns
     invalid_attrs = []
     select_attributes.each do |s|
-      next if ["href", "kind", "etag"].include? s
+      next if ignored_select_attributes.include? s
       if not s.is_a? String or not api_column_map.include? s
         invalid_attrs << s
       end
diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb
index 4a61292..4a05441 100644
--- a/services/api/app/models/collection.rb
+++ b/services/api/app/models/collection.rb
@@ -46,6 +46,10 @@ class Collection < ArvadosModel
                 )
   end
 
+  def self.ignored_select_attributes
+    super + ["updated_at", "file_names"]
+  end
+
   FILE_TOKEN = /^[[:digit:]]+:[[:digit:]]+:/
   def check_signatures
     return false if self.manifest_text.nil?

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list