Getting the IntegrityErrors to be OK if the data already exists in the

DB.

Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
Cliff Hill
2024-12-23 11:17:51 -05:00
parent d5e1008b19
commit 46ec1aafa8
3 changed files with 37 additions and 24 deletions

View File

@@ -8,6 +8,7 @@ from app.config import QueueNames
from app.dao.notifications_dao import (
dao_create_notification,
dao_delete_notifications_by_id,
dao_notification_exists,
get_notification_by_id,
)
from app.enums import KeyType, NotificationStatus, NotificationType
@@ -153,6 +154,10 @@ def persist_notification(
return notification
def notification_exists(notification_id):
return dao_notification_exists(notification_id)
def send_notification_to_queue_detached(
key_type, notification_type, notification_id, queue=None
):