mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-20 04:23:56 +00:00
removed extra default dict return, which causes error if user_role is a string
This commit is contained in:
@@ -1065,9 +1065,7 @@ async def user_api_key_auth(
|
||||
user_id_information, list
|
||||
):
|
||||
_user = user_id_information[0]
|
||||
user_role = _user.get("user_role", {}).get(
|
||||
"user_role", "unknown"
|
||||
)
|
||||
user_role = _user.get("user_role", "unknown")
|
||||
user_id = _user.get("user_id", "unknown")
|
||||
raise Exception(
|
||||
f"Only proxy admin can be used to generate, delete, update info for new keys/users/teams. Route={route}. Your role={user_role}. Your user_id={user_id}"
|
||||
|
||||
Reference in New Issue
Block a user