[ARVADOS] updated: c1b0e1bd832d3c2c96e60334b96f3b6989ecd1b6

git at public.curoverse.com git at public.curoverse.com
Tue Aug 26 11:25:05 EDT 2014


Summary of changes:
 apps/workbench/app/helpers/pipeline_instances_helper.rb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

       via  c1b0e1bd832d3c2c96e60334b96f3b6989ecd1b6 (commit)
      from  aa0ae05d87711be4ba005971677d4d28849f08b9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit c1b0e1bd832d3c2c96e60334b96f3b6989ecd1b6
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Tue Aug 26 11:25:01 2014 -0400

    3136: Use map to correctly get the list of uuids.  Check that there is a job
    record before trying to use it.

diff --git a/apps/workbench/app/helpers/pipeline_instances_helper.rb b/apps/workbench/app/helpers/pipeline_instances_helper.rb
index bce713e..396d750 100644
--- a/apps/workbench/app/helpers/pipeline_instances_helper.rb
+++ b/apps/workbench/app/helpers/pipeline_instances_helper.rb
@@ -28,7 +28,9 @@ module PipelineInstancesHelper
     ret = []
     i = -1
 
-    jobuuids = object.components.select { |cname, c| c[:job] and c[:job][:uuid] }
+    jobuuids = object.components.values.map { |c|
+      c[:job][:uuid] if c.is_a?(Hash) and c[:job].is_a?(Hash)
+    }.compact
     job = {}
     Job.where(uuid: jobuuids).each do |j|
       job[j[:uuid]] = j
@@ -41,7 +43,7 @@ module PipelineInstancesHelper
         ret << pj
         next
       end
-      if c[:job] and c[:job][:uuid]
+      if c[:job] and c[:job][:uuid] and job[c[:job][:uuid]]
         pj[:job] = job[c[:job][:uuid]]
       else
         pj[:job] = c[:job].is_a?(Hash) ? c[:job] : {}

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list