From 74c4038b6eea89f9f83adb2ad75c23049d402f5a Mon Sep 17 00:00:00 2001 From: Milo Hyben Date: Fri, 22 Nov 2024 10:45:49 +1100 Subject: [PATCH] external-org-name set to ''. --- scripts/upsert_participants.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/upsert_participants.py b/scripts/upsert_participants.py index 17e603b1..ff9a7217 100644 --- a/scripts/upsert_participants.py +++ b/scripts/upsert_participants.py @@ -110,7 +110,7 @@ def main( participant_meta: str, sample_meta: str, sample_external_id_column: str, - external_org_name: str = '', + external_org_name: str | None = None, ): # pylint: disable=too-many-locals """Upsert participants to metamist""" # Query metamist @@ -118,6 +118,10 @@ def main( data_response = get_sample_data(project) project_id = data_response.get('project')['id'] + # allow empty external_org_name for backwards compatibility + if external_org_name is None: + external_org_name = '' + sample_eid_mapping = map_sample_eid_to_sample_data(data_response) # Set up logging