Skip to content

Commit d46ce36

Browse files
authored
Merge pull request #92 from common-workflow-language/hotfix-assumed-default
Prevent steps being assumed default even when they have source
2 parents c4fbdc5 + f53f805 commit d46ce36

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/org/commonwl/viewer/domain/CWLCollection.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,12 @@ private Map<String, CWLElement> getStepInputsOutputs(JsonNode inOut) {
382382
Map.Entry<String, JsonNode> inOutNode = iterator.next();
383383
CWLElement inputOutput = new CWLElement();
384384
if (inOutNode.getValue().getClass() == ObjectNode.class) {
385-
inputOutput.setDefaultVal(extractDefault(inOutNode.getValue()));
385+
JsonNode properties = inOutNode.getValue();
386+
if (properties.has(SOURCE)) {
387+
inputOutput.addSourceID(stepIDFromSource(properties.get(SOURCE).asText()));
388+
} else {
389+
inputOutput.setDefaultVal(extractDefault(properties));
390+
}
386391
} else if (inOutNode.getValue().getClass() == ArrayNode.class) {
387392
for (JsonNode key : inOutNode.getValue()) {
388393
inputOutput.addSourceID(stepIDFromSource(key.asText()));

0 commit comments

Comments
 (0)