From 1aeeb814575b8be92c67bde2f445eb561e983807 Mon Sep 17 00:00:00 2001 From: Tosca Heunis Date: Tue, 16 Apr 2024 15:24:17 +0200 Subject: [PATCH] Fix code that assigns url unnecessarily The dataset-level URL field should only be populated if the dataset is a datalad dataset, which would make the 'Download with Dataset' button show up in a catalog page. --- code/process_subdirectory.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/process_subdirectory.py b/code/process_subdirectory.py index a1d6094..6a34567 100644 --- a/code/process_subdirectory.py +++ b/code/process_subdirectory.py @@ -58,8 +58,11 @@ "identifier": subds_id, "version": subds_version, "path_posix": subds_path, - "url": subds_url, } + # Only include URL if it is a datalad dataset + if args.dataset_type == "datalad": + subdataset["url"] = subds_url + # 3. Now add subdataset record to the superdataset tabby file at # '.datalad/tabby/self/subdatasets@tby-abcdjv0.tsv' # - First get the home page tabby record