From 8ad076b3546af500536be8aa1e2297ffd088c9ed Mon Sep 17 00:00:00 2001 From: Jumana Bahrainwala Date: Thu, 28 Nov 2024 21:28:03 +0000 Subject: [PATCH] add back message --- app/notifications/validators.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/notifications/validators.py b/app/notifications/validators.py index f146dc5067..6595bb4f6b 100644 --- a/app/notifications/validators.py +++ b/app/notifications/validators.py @@ -278,6 +278,9 @@ def check_sms_annual_limit(service: Service, requested_sms=0): def send_warning_email_limit_emails_if_needed(service: Service) -> None: + """ + Function that decides if we should send email warnings about nearing or reaching the email daily limit. + """ todays_current_email_count = fetch_todays_email_count(service.id) bool_nearing_email_daily_limit = todays_current_email_count >= NEAR_DAILY_LIMIT_PERCENTAGE * service.message_limit bool_at_or_over_email_daily_limit = todays_current_email_count >= service.message_limit