Do not blow up the provenance graph if a PDH used in the workflow no
authorWard Vandewege <wvandewege@veritasgenetics.com>
Mon, 25 Sep 2017 20:53:21 +0000 (16:53 -0400)
committerWard Vandewege <wvandewege@veritasgenetics.com>
Tue, 26 Sep 2017 02:11:48 +0000 (22:11 -0400)
longer exists.

refs #12316

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <wvandewege@veritasgenetics.com>

apps/workbench/app/helpers/provenance_helper.rb

index 94092a12ea10c1875067624778aa4c56ee7f6441..9b4d265dfa3a78df33f550f6309603b45dcc64e8 100644 (file)
@@ -232,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"