Skip to content

Commit 36d8a9a

Browse files
committed
skip null from items when testing same type
1 parent c22c762 commit 36d8a9a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cwltool/workflow.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ def are_same_type(src, sink): # type: (Any, Any) -> bool
9494
"""
9595
if isinstance(src, dict) and isinstance(sink, dict):
9696
if src["type"] == "array" and sink["type"] == "array":
97+
if 'null' in sink["items"]:
98+
return are_same_type([src["items"]], [it for it in sink["items"] if it != 'null'])
9799
return are_same_type(src["items"], sink["items"])
98100
elif src["type"] == sink["type"]:
99101
return True

0 commit comments

Comments
 (0)