(fix) do nothing if alerting is not switched on

This commit is contained in:
ishaan-jaff 2024-01-25 11:58:55 -08:00 committed by Krrish Dholakia
parent 1c9b02ad99
commit 5264a3eb53

View file

@ -188,6 +188,10 @@ class ProxyLogging:
user_current_spend: float,
user_info=None,
):
if self.alerting is None:
# do nothing if alerting is not switched on
return
if type == "user_and_proxy_budget":
user_info = dict(user_info)
user_id = user_info["user_id"]