Fix loading workflow version 0

Instead of checking that version is truth-y, check that version is an
Integer. Fixes https://github.com/galaxyproject/galaxy/issues/10593
together with b2ab9a3702.
This commit is contained in:
mvdbeek
2020-11-01 17:00:56 +01:00
parent e86c03ef4f
commit 540b77f2a6
@@ -24,7 +24,7 @@ export async function getModule(request_data) {
export async function loadWorkflow(workflow, id, version, appendData) {
try {
const versionQuery = version ? `version=${version}` : "";
const versionQuery = Number.isInteger(version) ? `version=${version}` : "";
const { data } = await axios.get(`${getAppRoot()}workflow/load_workflow?_=true&id=${id}&${versionQuery}`);
fromSimple(workflow, data, appendData);
return data;