mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
fix(auth_checks.py): fix redis usage for team cached objects
This commit is contained in:
parent
c551e5b47a
commit
142f4fefd0
5 changed files with 37 additions and 21 deletions
|
@ -461,14 +461,14 @@ async def user_api_key_auth(
|
|||
valid_token is not None
|
||||
and isinstance(valid_token, UserAPIKeyAuth)
|
||||
and valid_token.team_id is not None
|
||||
and user_api_key_cache.get_cache(
|
||||
key="team_id:{}".format(valid_token.team_id)
|
||||
)
|
||||
is not None
|
||||
):
|
||||
## UPDATE TEAM VALUES BASED ON CACHED TEAM OBJECT - allows `/team/update` values to work for cached token
|
||||
team_obj: LiteLLM_TeamTable = user_api_key_cache.get_cache(
|
||||
key="team_id:{}".format(valid_token.team_id)
|
||||
team_obj: LiteLLM_TeamTableCachedObj = await get_team_object(
|
||||
team_id=valid_token.team_id,
|
||||
prisma_client=prisma_client,
|
||||
user_api_key_cache=user_api_key_cache,
|
||||
parent_otel_span=parent_otel_span,
|
||||
proxy_logging_obj=proxy_logging_obj,
|
||||
)
|
||||
|
||||
if (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue