From f2d840881d1e4834b10162d57fc6593f33ef71c4 Mon Sep 17 00:00:00 2001 From: caufieldjh Date: Wed, 4 Sep 2024 17:19:20 -0400 Subject: [PATCH] Further input sanitizing --- src/kg_bioportal/downloader.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/kg_bioportal/downloader.py b/src/kg_bioportal/downloader.py index 40ce8d0..8bc64bd 100644 --- a/src/kg_bioportal/downloader.py +++ b/src/kg_bioportal/downloader.py @@ -136,7 +136,10 @@ def get_ontology_list(self) -> None: name = metadata["name"].replace("\n", " ").replace("\t", " ") if len(latest_submission) > 0: - current_version = latest_submission["version"].replace("\n", " ").replace("\t", " ") + if current_version: + current_version = latest_submission["version"].replace("\n", " ").replace("\t", " ") + else: + current_version = "NA" submission_id = latest_submission["submissionId"] else: current_version = "NA"