From 634e0227f369cb5f3b4b4b6777ef7d4f766fe2c1 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Thu, 14 Mar 2024 19:50:26 -0700 Subject: [PATCH] (fix) - update user error --- litellm/proxy/proxy_server.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 36254f426..4be3d81cc 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -1418,6 +1418,8 @@ async def update_cache( try: for _id in user_ids: # Fetch the existing cost for the given user + if _id is None: + continue existing_spend_obj = await user_api_key_cache.async_get_cache(key=_id) if existing_spend_obj is None: # if user does not exist in LiteLLM_UserTable, create a new user