Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cwltool/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ def formatSubclassOf(fmt, cls, ontology, visited):
def checkFormat(actualFile, inputFormats, ontology):
# type: (Union[Dict[Text, Any], List, Text], Union[List[Text], Text], Graph) -> None
for af in aslist(actualFile):
if not af:
continue
if "format" not in af:
raise validate.ValidationException(u"Missing required 'format' for File %s" % af)
for inpf in aslist(inputFormats):
Expand Down
8 changes: 4 additions & 4 deletions cwltool/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ def match_types(sinktype, src, iid, inputobj, linkMerge, valueFrom):
return True
elif isinstance(src.parameter["type"], list):
# Source is union type
# Check that every source type is compatible with the sink.
# Check that at least one source type is compatible with the sink.
for st in src.parameter["type"]:
srccopy = copy.deepcopy(src)
srccopy.parameter["type"] = st
if not match_types(st, srccopy, iid, inputobj, linkMerge, valueFrom):
return False
return True
if match_types(sinktype, srccopy, iid, inputobj, linkMerge, valueFrom):
return True
return False
elif linkMerge:
if iid not in inputobj:
inputobj[iid] = []
Expand Down