From 6a8d6ee0f87ce7ef92567f924b1c3190e7e5f1c3 Mon Sep 17 00:00:00 2001 From: Johnson Liang Date: Fri, 2 Aug 2024 03:14:56 +0800 Subject: [PATCH] fix(spend_tracking): spend log with no filter --- litellm/proxy/spend_tracking/spend_management_endpoints.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/litellm/proxy/spend_tracking/spend_management_endpoints.py b/litellm/proxy/spend_tracking/spend_management_endpoints.py index 9e0ef877e8..e66556b41d 100644 --- a/litellm/proxy/spend_tracking/spend_management_endpoints.py +++ b/litellm/proxy/spend_tracking/spend_management_endpoints.py @@ -1548,7 +1548,6 @@ async def view_spend_logs( raise Exception( f"Database not connected. Connect a database to your proxy - https://docs.litellm.ai/docs/simple_proxy#managing-auth---virtual-keys" ) - spend_logs = [] if ( start_date is not None and isinstance(start_date, str) @@ -1667,7 +1666,7 @@ async def view_spend_logs( else: return [spend_log] else: - spend_logs = await prisma_client.get_data( + spend_log = await prisma_client.get_data( table_name="spend", query_type="find_all" )