From: Lucas Di Pentima Date: Wed, 11 Aug 2021 18:37:46 +0000 (-0300) Subject: 18005: Fixes the bug. X-Git-Tag: 2.2.2~36 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/e390a79e2408a8e5df65f0b33cad84a3fca244af 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 4e7b64cf53..c522088ff5 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