[ARVADOS] updated: 2.1.0-219-g9e75bd68c

Git user git at public.arvados.org
Mon Dec 14 13:31:51 UTC 2020


Summary of changes:
 services/api/app/models/collection.rb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

       via  9e75bd68c7a0171e85632b30f62ae19e923af096 (commit)
      from  d5745d536d013a6731e0e6a872abe34d71f0995e (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 9e75bd68c7a0171e85632b30f62ae19e923af096
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Mon Dec 14 10:31:14 2020 -0300

    17152: Improves modified_at conditional update check.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb
index c2c60ec70..4e7b64cf5 100644
--- a/services/api/app/models/collection.rb
+++ b/services/api/app/models/collection.rb
@@ -37,8 +37,6 @@ class Collection < ArvadosModel
   validate :protected_managed_properties_updates, on: :update
   after_validation :set_file_count_and_total_size
   before_save :set_file_names
-  before_update :preserve_version_exclusive_updates_leave_modified_at_alone,
-    if: Proc.new { |col| col.changes.keys.sort == ['modified_at', 'updated_at', 'preserve_version'].sort }
   around_update :manage_versioning, unless: :is_past_version?
 
   api_accessible :user, extend: :common do |t|
@@ -308,8 +306,10 @@ class Collection < ArvadosModel
     end
   end
 
-  def preserve_version_exclusive_updates_leave_modified_at_alone
-    self.modified_at = self.modified_at_was
+  def maybe_update_modified_by_fields
+    if !(self.changes.keys - ['updated_at', 'preserve_version']).empty?
+      super
+    end
   end
 
   def syncable_updates

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list