mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-16 02:02:13 -05:00
Daily message limit imposed for service api calls.
This commit is contained in:
@@ -221,7 +221,7 @@ def send_notification(notification_type):
|
||||
total_sms_count = service_stats.sms_requested
|
||||
total_email_count = service_stats.emails_requested
|
||||
|
||||
if (total_email_count + total_sms_count >= service.message_limit) and service.restricted:
|
||||
if (total_email_count + total_sms_count >= service.message_limit):
|
||||
error = 'Exceeded send limits ({}) for today'.format(service.message_limit)
|
||||
raise InvalidRequest(error, status_code=429)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user