Update litellm/proxy/management_endpoints/jwt_key_mapping_endpoints.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Harshit Jain 2026-03-01 13:08:40 +05:30 • committed by GitHub
parent 941129c9e0
commit 963390928d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -55,7 +55,9 @@ async def update_jwt_key_mapping(
if prisma_client is None:
raise HTTPException(status_code=500, detail="Database not connected")
update_data = data.model_dump(exclude_unset=True, exclude={"id"})
update_data = data.model_dump(exclude_unset=True, exclude={"id", "key"})
if data.key is not None:
update_data["token"] = hash_token(data.key)
try:
# Get old mapping for cache invalidation