forked from phoenix/litellm-mirror
fix(proxy_server.py): fix /user/info for non-existent user id
This commit is contained in:
parent
01921aeb5a
commit
fd4086d5da
2 changed files with 4 additions and 2 deletions
|
@ -4689,7 +4689,9 @@ async def user_info(
|
||||||
if team.team_id not in team_id_list:
|
if team.team_id not in team_id_list:
|
||||||
team_list.append(team)
|
team_list.append(team)
|
||||||
team_id_list.append(team.team_id)
|
team_id_list.append(team.team_id)
|
||||||
elif user_api_key_dict.user_id is not None:
|
elif (
|
||||||
|
user_api_key_dict.user_id is not None and user_id is None
|
||||||
|
): # the key querying the endpoint is the one asking for it's teams
|
||||||
caller_user_info = await prisma_client.get_data(
|
caller_user_info = await prisma_client.get_data(
|
||||||
user_id=user_api_key_dict.user_id
|
user_id=user_api_key_dict.user_id
|
||||||
)
|
)
|
||||||
|
|
|
@ -767,7 +767,7 @@ class PrismaClient:
|
||||||
):
|
):
|
||||||
args_passed_in = locals()
|
args_passed_in = locals()
|
||||||
verbose_proxy_logger.debug(
|
verbose_proxy_logger.debug(
|
||||||
f"PrismaClient: get_data: token={token}, table_name: {table_name}, query_type: {query_type}, user_id: {user_id}, user_id_list: {user_id_list}, team_id: {team_id}, team_id_list: {team_id_list}, key_val: {key_val}"
|
f"PrismaClient: get_data - args_passed_in: {args_passed_in}"
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
response: Any = None
|
response: Any = None
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue