Skip to content

Commit 5f81d9a

Browse files
committed
Fix ordering of format parameter in workflow RO ID
1 parent 1f69623 commit 5f81d9a

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/main/java/org/commonwl/view/researchobject/ROBundleService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ public Bundle createBundle(Workflow workflow, GitDetails gitInfo) throws IOExcep
127127
String packedId = workflow.getRetrievedFrom().getPackedId();
128128
String packedPart = (packedId != null) ? "#" + packedId : "";
129129
String id = "https://w3id.org/cwl/v/git/" + workflow.getLastCommit() +
130-
"/" + workflow.getRetrievedFrom().getPath() + packedPart;
131-
manifest.setId(new URI(id));
130+
"/" + workflow.getRetrievedFrom().getPath();
131+
manifest.setId(new URI(id + packedPart));
132132

133133
// Tool attribution in createdBy
134134
manifest.setCreatedBy(appAgent);
@@ -137,7 +137,7 @@ public Bundle createBundle(Workflow workflow, GitDetails gitInfo) throws IOExcep
137137
// TODO: Make this importedBy/On/From
138138
manifest.setRetrievedBy(appAgent);
139139
manifest.setRetrievedOn(manifest.getCreatedOn());
140-
manifest.setRetrievedFrom(new URI(id + "?format=ro"));
140+
manifest.setRetrievedFrom(new URI(id + "?format=ro" + packedPart));
141141

142142
// Make a directory in the RO bundle to store the files
143143
Path bundleRoot = bundle.getRoot();

src/main/java/org/commonwl/view/workflow/WorkflowController.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,7 @@ public FileSystemResource downloadGraphSvg(@PathVariable("domain") String domain
264264
path = extractPath(path, 8);
265265
GitDetails gitDetails = getGitDetails(domain, owner, repoName, branch, path);
266266
response.setHeader("Content-Disposition", "inline; filename=\"graph.svg\"");
267-
FileSystemResource test = workflowService.getWorkflowGraph("svg", gitDetails);
268-
return test;
267+
return workflowService.getWorkflowGraph("svg", gitDetails);
269268
}
270269

271270
/**

0 commit comments

Comments
 (0)