Merge branch 'master' into 10293-cwl-cr-output
[arvados.git] / apps / workbench / app / controllers / pipeline_instances_controller.rb
index e84d990479602967136de6d1472bec3e5b66c9c8..c5fbda0cf349177801a0bcbbd75c7c95634b56ef 100644 (file)
@@ -287,7 +287,7 @@ class PipelineInstancesController < ApplicationController
   helper_method :unreadable_inputs_present?
   def unreadable_inputs_present?
     unless @unreadable_inputs_present.nil?
-      @unreadable_inputs_present
+      return @unreadable_inputs_present
     end
 
     input_uuids = []
@@ -295,13 +295,15 @@ class PipelineInstancesController < ApplicationController
     @object.components.each do |k, component|
       next if !component
       component[:script_parameters].andand.each do |p, tv|
-        if (tv.is_a? Hash) and (tv[:dataclass] == "Collection")
+        if (tv.is_a? Hash) and ((tv[:dataclass] == "Collection") || (tv[:dataclass] == "File"))
           if tv[:value]
             value = tv[:value]
           elsif tv[:default]
             value = tv[:default]
+          else
+            value = ''
           end
-          if value
+          if value.present?
             split = value.split '/'
             if CollectionsHelper.match(split[0])
               input_pdhs << split[0]