From 03c65c889a640c2a1d58413e5b5f67e036497b3e Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 21 Aug 2024 19:10:37 -0700 Subject: [PATCH] fix team_member_add --- litellm/proxy/management_endpoints/team_endpoints.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/management_endpoints/team_endpoints.py b/litellm/proxy/management_endpoints/team_endpoints.py index d3c2e3e839b..614f37f4449 100644 --- a/litellm/proxy/management_endpoints/team_endpoints.py +++ b/litellm/proxy/management_endpoints/team_endpoints.py @@ -479,7 +479,8 @@ async def team_member_add( ## CHECK IF USER IS PROXY ADMIN OR TEAM ADMIN if ( - user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN.value + hasattr(user_api_key_dict, "user_role") + and user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN.value and not _is_user_team_admin( user_api_key_dict=user_api_key_dict, team_obj=complete_team_data )