From ce35f66740666922aa16266f17ffb50b0ce18fd8 Mon Sep 17 00:00:00 2001 From: Gordon Krieger Date: Tue, 23 Jan 2024 20:07:34 +0000 Subject: [PATCH 1/2] patch type error in dats default --- bento_beacon/endpoints/info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bento_beacon/endpoints/info.py b/bento_beacon/endpoints/info.py index afc22e12..260befa7 100644 --- a/bento_beacon/endpoints/info.py +++ b/bento_beacon/endpoints/info.py @@ -124,7 +124,7 @@ def build_service_info(): # may be multiple datasets, so collect all descriptions into one string # for custom description, add a "description" field to service info in beacon_config.json k_datasets = katsu_datasets() - dats_array = list(map(lambda d: json.loads(d.get("datsFile", {})), k_datasets)) + dats_array = list(map(lambda d: json.loads(d.get("datsFile", "{}")), k_datasets)) description = " ".join([d.get("description") for d in dats_array if "description" in d]) if description and service_info.get("description") is None: service_info["description"] = description From 5eec3f6fb505adc22ed7fa5afaa76575d45b52fe Mon Sep 17 00:00:00 2001 From: Gordon Krieger Date: Tue, 23 Jan 2024 20:08:32 +0000 Subject: [PATCH 2/2] whitespace :( --- bento_beacon/endpoints/info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bento_beacon/endpoints/info.py b/bento_beacon/endpoints/info.py index 260befa7..53e9df06 100644 --- a/bento_beacon/endpoints/info.py +++ b/bento_beacon/endpoints/info.py @@ -124,7 +124,7 @@ def build_service_info(): # may be multiple datasets, so collect all descriptions into one string # for custom description, add a "description" field to service info in beacon_config.json k_datasets = katsu_datasets() - dats_array = list(map(lambda d: json.loads(d.get("datsFile", "{}")), k_datasets)) + dats_array = list(map(lambda d: json.loads(d.get("datsFile", "{}")), k_datasets)) description = " ".join([d.get("description") for d in dats_array if "description" in d]) if description and service_info.get("description") is None: service_info["description"] = description