Skip to content

Commit 77a2a31

Browse files
committed
also fix sourceles inputs for v1.0
1 parent 40b101d commit 77a2a31

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

cwl_utils/cwl_v1_0_expression_refactor.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -514,12 +514,18 @@ def empty_inputs(
514514
result[param.id.split("#")[-1]] = example_input(param.type)
515515
else:
516516
for param in process_or_step.in_:
517-
try:
518-
result[param.id.split("/")[-1]] = example_input(
519-
type_for_source(process_or_step.run, param.source, parent)
520-
)
521-
except WorkflowException:
522-
pass
517+
param_id = param.id.split("/")[-1]
518+
if param.source is None and param.valueFrom:
519+
result[param_id] = example_input("string")
520+
elif param.source is None and param.default:
521+
result[param_id] = param.default
522+
else:
523+
try:
524+
result[param_id] = example_input(
525+
type_for_source(process_or_step.run, param.source, parent)
526+
)
527+
except WorkflowException:
528+
pass
523529
return result
524530

525531

0 commit comments

Comments
 (0)