Getting NotificationStatus implemented everywhere.

Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
Cliff Hill
2024-01-18 10:28:15 -05:00
parent a177042e77
commit 69a9accfca
16 changed files with 179 additions and 285 deletions

View File

@@ -13,10 +13,9 @@ from app.dao.organization_dao import dao_get_organization_by_email_address
from app.dao.service_sms_sender_dao import insert_service_sms_sender
from app.dao.service_user_dao import dao_get_service_user
from app.dao.template_folder_dao import dao_get_valid_template_folders_by_id
from app.enums import NotificationType, ServicePermissionType
from app.enums import NotificationStatus, NotificationType, ServicePermissionType
from app.models import (
KEY_TYPE_TEST,
NOTIFICATION_PERMANENT_FAILURE,
AnnualBilling,
ApiKey,
FactBilling,
@@ -565,7 +564,7 @@ def dao_find_services_with_high_failure_rates(start_date, end_date, threshold=10
Notification.created_at <= end_date,
Notification.key_type != KEY_TYPE_TEST,
Notification.notification_type == NotificationType.SMS,
Notification.status == NOTIFICATION_PERMANENT_FAILURE,
Notification.status == NotificationStatus.PERMANENT_FAILURE,
Service.restricted == False, # noqa
Service.active == True, # noqa
)