Refactor get_id_from_search_string function to convert UUID to string in service.py

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-05-02 12:56:57 -03:00
commit e3edc54d64

View file

@ -64,7 +64,7 @@ def get_id_from_search_string(search_string: str) -> Optional[str]:
possible_id = search_string.split("/")[-1]
try:
possible_id = UUID(search_string)
possible_id = str(UUID(search_string))
except ValueError:
possible_id = None
return possible_id