From 7330db33df73dbb204d362253668436cb5caa7b3 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Sat, 1 Feb 2014 16:06:33 -0800 Subject: [PATCH] Fix crash when component has missing attributes (e.g., no job was run). refs #1978 --- apps/workbench/app/views/pipeline_instances/compare.html.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/workbench/app/views/pipeline_instances/compare.html.erb b/apps/workbench/app/views/pipeline_instances/compare.html.erb index cf1aa5f28b..08128a1179 100644 --- a/apps/workbench/app/views/pipeline_instances/compare.html.erb +++ b/apps/workbench/app/views/pipeline_instances/compare.html.erb @@ -48,6 +48,8 @@ <% unless key=='output' and pj[:result] != 'complete' %> <% val = pj[key.to_sym] || pj[:job].andand[key.to_sym] %> <% link_name = case + when !val + val = '' when key == 'script_version' && val.match(/^[0-9a-f]{7,}$/) val = val[0..7] # TODO: leave val alone, make link_to handle git commits when key == 'output' -- 2.39.5