Skip to content

Commit

Permalink
skip null from items when testing same type
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbarrera committed May 4, 2016
1 parent c22c762 commit 36d8a9a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cwltool/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ def are_same_type(src, sink): # type: (Any, Any) -> bool
"""
if isinstance(src, dict) and isinstance(sink, dict):
if src["type"] == "array" and sink["type"] == "array":
if 'null' in sink["items"]:
return are_same_type([src["items"]], [it for it in sink["items"] if it != 'null'])
return are_same_type(src["items"], sink["items"])
elif src["type"] == sink["type"]:
return True
Expand Down

0 comments on commit 36d8a9a

Please sign in to comment.