Skip to content

Commit

Permalink
Merge pull request #74 from alexbarrera/fix-skin-type-ckeck-items-null
Browse files Browse the repository at this point in the history
skip null from items when testing same type
  • Loading branch information
mr-c committed May 7, 2016
2 parents 1220ccc + 36d8a9a commit baf9e75
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 baf9e75

Please sign in to comment.