diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 45f432f9df..0bb1271673 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -4689,7 +4689,9 @@ async def user_info( if team.team_id not in team_id_list: team_list.append(team) 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( user_id=user_api_key_dict.user_id ) diff --git a/litellm/proxy/utils.py b/litellm/proxy/utils.py index 4bfb87058b..42ae6a3785 100644 --- a/litellm/proxy/utils.py +++ b/litellm/proxy/utils.py @@ -767,7 +767,7 @@ class PrismaClient: ): args_passed_in = locals() 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: response: Any = None