Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
apdavison committed Oct 17, 2024
1 parent 6ddeb11 commit b39828a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions validation_service_api/validation_service/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ def _check_service_status():
def _get_model_by_id_or_alias(model_id, kg_client, scope, use_cache=False):
try:
model_id = UUID(model_id)
get_model = Model.from_uuid
model_project = Model.from_uuid(str(model_id), kg_client, scope=scope, use_cache=use_cache)
except ValueError:
get_model = Model.from_alias
model_project = get_model(str(model_id), kg_client, scope=scope, use_cache=use_cache)
model_project = Model.from_alias(model_id, kg_client, scope=scope)
if not model_project:
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
Expand Down

0 comments on commit b39828a

Please sign in to comment.