Skip to content

Commit 47d3112

Browse files
authored
Don't complain MultipleInputRequirement if source is single-item list. (#605)
1 parent 7dd2a26 commit 47d3112

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cwltool/workflow.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -210,13 +210,13 @@ def object_from_state(state, parms, frag_only, supportsMultipleInput, sourceFiel
210210
if frag_only:
211211
iid = shortname(iid)
212212
if sourceField in inp:
213-
if (isinstance(inp[sourceField], list) and not
214-
supportsMultipleInput):
213+
connections = aslist(inp[sourceField])
214+
if (len(connections) > 1 and
215+
not supportsMultipleInput):
215216
raise WorkflowException(
216217
"Workflow contains multiple inbound links to a single "
217218
"parameter but MultipleInputFeatureRequirement is not "
218219
"declared.")
219-
connections = aslist(inp[sourceField])
220220
for src in connections:
221221
if src in state and state[src] is not None and (state[src].success == "success" or incomplete):
222222
if not match_types(

0 commit comments

Comments
 (0)