Skip to content

Commit

Permalink
Merge pull request #506 from hubmapconsortium/validates_uuids_of_reco…
Browse files Browse the repository at this point in the history
…rds_fix

Comparison values are chnaged to lower case because that is what enti…
  • Loading branch information
yuanzhou authored Mar 1, 2024
2 parents 8e71fb5 + 20f456b commit 02bb6b5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/routes/validation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 02bb6b5

Please sign in to comment.