From c9f0347802b2d7b4844f283072c7931504e25ade Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Mon, 25 May 2015 10:23:53 -0400 Subject: [PATCH] 6087: Compute portable_data_hash only once during check_signatures. --- services/api/app/models/collection.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb index 015efedfa3..f7a715af58 100644 --- a/services/api/app/models/collection.rb +++ b/services/api/app/models/collection.rb @@ -51,7 +51,8 @@ class Collection < ArvadosModel # subsequent passes without checking any signatures. This is # important because the signatures have probably been stripped off # by the time we get to a second validation pass! - return true if @signatures_checked and @signatures_checked == compute_pdh + computed_pdh = compute_pdh + return true if @signatures_checked and @signatures_checked == computed_pdh if self.manifest_text_changed? # Check permissions on the collection manifest. @@ -87,7 +88,7 @@ class Collection < ArvadosModel end end end - @signatures_checked = compute_pdh + @signatures_checked = computed_pdh end def strip_manifest_text -- 2.30.2