From: Lucas Di Pentima Date: Wed, 11 Aug 2021 18:37:46 +0000 (-0300) Subject: 18005: Fixes the bug. X-Git-Tag: 2.3.0~113^2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/c3481a62091153eb0f74cd2f769d46c552765fcb 18005: Fixes the bug. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb index d1d5ace0c3..1bbe8cc661 100644 --- a/services/api/app/models/collection.rb +++ b/services/api/app/models/collection.rb @@ -150,7 +150,9 @@ class Collection < ArvadosModel def strip_signatures_and_update_replication_confirmed if self.manifest_text_changed? in_old_manifest = {} - if not self.replication_confirmed.nil? + # manifest_text_was could be nil when dealing with a freshly created snapshot, + # so we skip this case because there was no real manifest change. (Bug #18005) + if (not self.replication_confirmed.nil?) and (not self.manifest_text_was.nil?) self.class.each_manifest_locator(manifest_text_was) do |match| in_old_manifest[match[1]] = true end