From e6786cc5aed5d51114b6c6764f3e67cd655d18a1 Mon Sep 17 00:00:00 2001 From: Lisa-Ann B <115558393+libpitt@users.noreply.github.com> Date: Tue, 23 Jun 2026 11:28:37 -0400 Subject: [PATCH] Set default return - #961 --- src/lib/ontology.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/lib/ontology.py b/src/lib/ontology.py index b131f599..5ef06b2d 100644 --- a/src/lib/ontology.py +++ b/src/lib/ontology.py @@ -45,8 +45,15 @@ def val_callback(dict): as_data_dict=True, key_callback=prop_callback, val_callback=val_callback, data_as_val=True, ).dataset_types_hierarchy() - if dataset_type is not None and dataset_type in all_facets: - return all_facets[dataset_type] + if dataset_type is not None: + if dataset_type in all_facets: + return all_facets[dataset_type] + else: + return [{ + "modality": 'N/A', + "analyte": 'N/A', + "dataset_type": dataset_type + }] else: matrix = list(all_facets.values())