fix(user_api_key_auth.py): update team values in token cache if refreshed more recently

This commit is contained in:
Krrish Dholakia 2024-07-19 17:35:59 -07:00
parent 548b2fcf4b
commit b92af48854
4 changed files with 31 additions and 9 deletions

View file

@ -1331,7 +1331,9 @@ class PrismaClient:
response["team_models"] = []
if response["team_blocked"] is None:
response["team_blocked"] = False
response = LiteLLM_VerificationTokenView(**response)
response = LiteLLM_VerificationTokenView(
**response, last_refreshed_at=time.time()
)
# for prisma we need to cast the expires time to str
if response.expires is not None and isinstance(
response.expires, datetime