From 8feaff6652cf96da6e9bcb583e9003467a14972b Mon Sep 17 00:00:00 2001 From: Helena Rasche Date: Mon, 24 Jun 2024 16:40:43 +0200 Subject: [PATCH] fix how the upload works --- bin/wfh-upload.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/wfh-upload.py b/bin/wfh-upload.py index 2e8c2a0e4120aa..567f867720cda0 100755 --- a/bin/wfh-upload.py +++ b/bin/wfh-upload.py @@ -19,7 +19,7 @@ def doUpload(crate_path): p = crate_path.split("/") - (topic, tutorial, workflow) = p[4:7] + (topic, tutorial, workflow) = p[3:6] payload = { "ro_crate": (crate_path, open(crate_path, "rb")), @@ -78,7 +78,7 @@ def doUpload(crate_path): data = {} for (topic, tutorial, workflow, wf_id) in results: - data.setdefault(topic, {}).setdefault(tutorial, {})[workflow] = wf_id + data['/'.join([topic, tutorial, workflow])] = wf_id with open('metadata/workflowhub.yml', 'w') as handle: yaml.dump(data, handle)