[ARVADOS] updated: 1.3.0-612-gfc636d5e1
Git user
git at public.curoverse.com
Mon Apr 1 15:37:38 UTC 2019
Summary of changes:
services/api/app/models/collection.rb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
via fc636d5e169d944981ce2951e05d59fad04563a3 (commit)
from e26648fc591101349db5644c9927651f84972c3d (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 fc636d5e169d944981ce2951e05d59fad04563a3
Author: Eric Biagiotti <ebiagiotti at veritasgenetics.com>
Date: Mon Apr 1 11:37:33 2019 -0400
14484: Moves the file count and total size callback to after_validation
Arvados-DCO-1.1-Signed-off-by: Eric Biagiotti <ebiagiotti at veritasgenetics.com>
diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb
index 3dc64f6e0..3c7f7c745 100644
--- a/services/api/app/models/collection.rb
+++ b/services/api/app/models/collection.rb
@@ -29,9 +29,9 @@ class Collection < ArvadosModel
validate :ensure_storage_classes_contain_non_empty_strings
validate :versioning_metadata_updates, on: :update
validate :past_versions_cannot_be_updated, on: :update
- validate :file_count_and_size_cannot_be_changed
+ validate :file_count_and_size_cannot_be_changed, on: :update
+ after_validation :set_file_count_and_total_size
before_save :set_file_names
- before_save :set_file_count_and_total_size
around_update :manage_versioning
api_accessible :user, extend: :common do |t|
@@ -200,7 +200,7 @@ class Collection < ArvadosModel
end
def set_file_count_and_total_size
- if self.manifest_text_changed? && self.valid?
+ if self.manifest_text_changed?
m = Keep::Manifest.new(self.manifest_text)
self.file_size_total = m.files_size
self.file_count = m.files_count
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list