Skip to content

Commit

Permalink
fix: allow VFolder id as name parameter in API
Browse files Browse the repository at this point in the history
  • Loading branch information
fregataa committed Jan 15, 2025
1 parent 76f646c commit 42f46a4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ai/backend/manager/api/vfolder.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,11 @@ async def resolve_vfolder_rows(

match folder_id_or_name:
case str():
extra_vf_conds = vfolders.c.name == folder_id_or_name
try:
folder_id = uuid.UUID(folder_id_or_name)
extra_vf_conds = vfolders.c.id == folder_id
except ValueError:
extra_vf_conds = vfolders.c.name == folder_id_or_name
case uuid.UUID():
extra_vf_conds = vfolders.c.id == folder_id_or_name
case _:
Expand Down

0 comments on commit 42f46a4

Please sign in to comment.