From 8225880af0e09b919928704c939863456863e665 Mon Sep 17 00:00:00 2001 From: Paz Date: Tue, 1 Oct 2024 12:02:16 -0300 Subject: [PATCH] Fix: skip slack alert if there was no spend (#5998) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: MarĂ­a Paz Cuturi --- litellm/integrations/SlackAlerting/slack_alerting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/integrations/SlackAlerting/slack_alerting.py b/litellm/integrations/SlackAlerting/slack_alerting.py index 48fec5fc0..a6126afa7 100644 --- a/litellm/integrations/SlackAlerting/slack_alerting.py +++ b/litellm/integrations/SlackAlerting/slack_alerting.py @@ -1630,7 +1630,7 @@ Model Info: start_date=start_date.strftime("%Y-%m-%d"), end_date=todays_date.strftime("%Y-%m-%d"), ) - if _resp is None: + if _resp is None or _resp == ([], []): return spend_per_team, spend_per_tag = _resp