From 20f456bba17eb6bea5170b72d17c68b5ac10917e Mon Sep 17 00:00:00 2001 From: ChuckKollar Date: Wed, 28 Feb 2024 15:18:06 -0500 Subject: [PATCH] Comparison values are chnaged to lower case because that is what entity-api returns in the entity object for the given field --- src/routes/validation/__init__.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/routes/validation/__init__.py b/src/routes/validation/__init__.py index 68765c47..79d414ef 100644 --- a/src/routes/validation/__init__.py +++ b/src/routes/validation/__init__.py @@ -228,10 +228,17 @@ def get_sub_type_name_by_entity_type(entity_type: str) -> str: def supported_metadata_sub_types(entity_type: str) -> list: + """ + See https://github.com/hubmapconsortium/ingest-api/issues/503 for an explanation + of why the formerly capitalized strings were changed to lower case in the data returned. + + Bill: I’m guessing the equivalent values aren’t available in the HuBMAP ontology/ubkg, + so for now just lower case the hard coded values that it is comparing them too. + """ if equals(entity_type, 'Source'): - return ['Human'] + return ['human'] else: - return ["Block", "Section", "Suspension"] + return ["block", "section", "suspension"] def validate_records_uuids(records: list, entity_type: str, sub_type, pathname: str):