From 651af48742f25678a55f2c0786379e688050a200 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Wed, 14 Jun 2023 07:50:04 -0700 Subject: [PATCH] fix all inline statuses except delivered --- app/dao/notifications_dao.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/dao/notifications_dao.py b/app/dao/notifications_dao.py index 375d324a0..526980140 100644 --- a/app/dao/notifications_dao.py +++ b/app/dao/notifications_dao.py @@ -270,6 +270,10 @@ def _filter_query(query, filter_dict=None): # TODO WHY if len(statuses) == 5 and 'temporary-failure' in statuses: statuses = ['failed'] + elif len(statuses) == 10: + statuses = ['failed', 'sending', 'delivered'] + elif statuses == ['pending']: + statuses = ['sending'] print(f"STATUSES = {statuses}") query = query.filter(Notification.status.in_(statuses))