13558: Merge branch 'master' into wtsi-hgi-13558-debug-log-tag-req-id
[arvados.git] / apps / workbench / app / helpers / provenance_helper.rb
index 0b839754261507d6368f525b87570d7797dddafa..9b4d265dfa3a78df33f550f6309603b45dcc64e8 100644 (file)
@@ -1,3 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
 module ProvenanceHelper
 
   class GenerateGraph
@@ -228,7 +232,11 @@ module ProvenanceHelper
                   # Search for any collection with this PDH
                   cols = @opts[:input_collections][pdh]
                 end
-                names = cols.collect{|x| x[:name]}.uniq
+                if cols
+                  names = cols.collect{|x| x[:name]}.uniq
+                else
+                  names = ['(collection not found)']
+                end
                 input_name = names.first
                 if names.length > 1
                   input_name += " + #{names.length - 1} more"