X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/818e9974a935703de29239f97b225ba7505537f8..c3481a62091153eb0f74cd2f769d46c552765fcb:/services/api/app/models/collection.rb 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