mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-18 13:38:53 -04:00
Update limit to message_limit.
Further db changes and updates. Remove traceback print out. Fix bug in passing template id to a task.
This commit is contained in:
@@ -287,8 +287,9 @@ 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.limit) and service.restricted:
|
||||
return jsonify(result="error", message='Exceeded send limits ({}) for today'.format(service.limit)), 429
|
||||
if (total_email_count + total_sms_count >= service.message_limit) and service.restricted:
|
||||
return jsonify(result="error", message='Exceeded send limits ({}) for today'.format(
|
||||
service.message_limit)), 429
|
||||
|
||||
notification, errors = (
|
||||
sms_template_notification_schema if notification_type == 'sms' else email_notification_schema
|
||||
|
||||
Reference in New Issue
Block a user