From 36d8a9ab8bb8f865f1a5681d708e6bbce17a33d5 Mon Sep 17 00:00:00 2001 From: Alejandro Barrera Date: Wed, 4 May 2016 17:06:56 -0400 Subject: [PATCH] skip null from items when testing same type --- cwltool/workflow.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cwltool/workflow.py b/cwltool/workflow.py index 6b369c823..f7bdaad77 100644 --- a/cwltool/workflow.py +++ b/cwltool/workflow.py @@ -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