Merge branch 'master' into 3836-remove-collection-from-project-bug
[arvados.git] / apps / workbench / app / controllers / application_controller.rb
index dc8325cc18b17590735e5927c5af4341eed27143..4b775c6036af8bd37c848c2dfc5bf227a41cbfb7 100644 (file)
@@ -694,11 +694,11 @@ class ApplicationController < ActionController::Base
 
   helper_method :running_pipelines
   def running_pipelines
-    pi = PipelineInstance.order(["started_at asc", "created_at asc"]).filter([["state", "in", ["RunningOnServer"]]])
+    pi = PipelineInstance.order(["started_at asc", "created_at asc"]).filter([["state", "in", ["RunningOnServer", "RunningOnClient"]]])
     jobs = {}
     pi.each do |pl|
       pl.components.each do |k,v|
-        if v[:job]
+        if v.is_a? Hash and v[:job]
           jobs[v[:job][:uuid]] = {}
         end
       end
@@ -710,7 +710,7 @@ class ApplicationController < ActionController::Base
 
     pi.each do |pl|
       pl.components.each do |k,v|
-        if v[:job]
+        if v.is_a? Hash and v[:job]
           v[:job] = jobs[v[:job][:uuid]]
         end
       end