diff --git a/pipelines/nextflow/workflows/bin/get_metadata.py b/pipelines/nextflow/workflows/bin/get_metadata.py index 5c28d64..519ab9d 100755 --- a/pipelines/nextflow/workflows/bin/get_metadata.py +++ b/pipelines/nextflow/workflows/bin/get_metadata.py @@ -143,8 +143,8 @@ def json_parse(response: str, fields: list): table_study = { "study": { - "study_accession": re.sub(r"[!\"#$%&()*\+,\-\'.\/:;<=>?@\[\]^`{|}~]", "",output_data["study_accession"]), - "center_name": re.sub(r"[!\"#$%&()*\+,\-\'.\/:;<=>?@\[\]^`{|}~]", "",output_data["center_name"]), + "study_accession": re.sub(r"[!\"#$%&()*\+,\-\'.\/:;<=>?@\[\]^`{|}~]", "",output_data["study_accession"]) if output_data["study_accession"] else None, + "center_name": re.sub(r"[!\"#$%&()*\+,\-\'.\/:;<=>?@\[\]^`{|}~]", "",output_data["center_name"]) if output_data["center_name"] else None, } }