10315: Merge branch 'master' into 10315-new-arv-put-performance
[arvados.git] / apps / workbench / app / models / pipeline_instance.rb
index b51f07c40b36e0324b09e14c81dbf632dbcd7a68..e9fa04ab6d09419f7875354a01c26b33c8c0b679 100644 (file)
@@ -13,7 +13,7 @@ class PipelineInstance < ArvadosBase
       template = if lookup and lookup[self.pipeline_template_uuid]
                    lookup[self.pipeline_template_uuid]
                  else
-                   PipelineTemplate.where(uuid: self.pipeline_template_uuid).first
+                   PipelineTemplate.find?(self.pipeline_template_uuid) if self.pipeline_template_uuid
                  end
       if template
         template.name
@@ -133,7 +133,7 @@ class PipelineInstance < ArvadosBase
   end
 
   def work_unit(label=nil)
-    PipelineInstanceWorkUnit.new(self, label || self.name)
+    PipelineInstanceWorkUnit.new(self, label || self.name, self.uuid)
   end
 
   private