Skip to content

Commit

Permalink
Merge pull request #232 from TranslatorSRI/get-semantic-types-uniq
Browse files Browse the repository at this point in the history
The `/get_semantic_types` endpoint returns a list with duplicates. I'm not sure why this is the case -- I'm guessing a loader is malfunctioning -- but this can be easily fixed by uniquifying the list before returning it to the endpoint.

Closes #153.
  • Loading branch information
gaurav authored Dec 7, 2023
2 parents d5b6a48 + 281bb1b commit 371e41f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion node_normalizer/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ async def get_semantic_types_handler() -> SemanticTypes:

# get the distinct list of Biolink model types in the correct format
# https://github.com/TranslatorSRI/NodeNormalization/issues/29
ret_val = SemanticTypes(semantic_types={"types": types})
ret_val = SemanticTypes(semantic_types={"types": list(set(types))})

# return the data to the caller
return ret_val
Expand Down

0 comments on commit 371e41f

Please sign in to comment.