mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +00:00
fix(internal_user_endpoints.py): add check on sortby value
This commit is contained in:
parent
1e3a1cba23
commit
31f704a370
1 changed files with 6 additions and 1 deletions
|
@ -1043,7 +1043,12 @@ async def get_users(
|
|||
where_conditions = {k: v for k, v in where_conditions.items() if v is not None}
|
||||
|
||||
# Build order_by conditions
|
||||
order_by: Optional[Dict[str, str]] = _validate_sort_params(sort_by, sort_order)
|
||||
|
||||
order_by: Optional[Dict[str, str]] = (
|
||||
_validate_sort_params(sort_by, sort_order)
|
||||
if sort_by is not None and isinstance(sort_by, str)
|
||||
else None
|
||||
)
|
||||
|
||||
users = await prisma_client.db.litellm_usertable.find_many(
|
||||
where=where_conditions,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue