From 99a38159f53826b7fb7f1fb4f6c21607070e9f4c Mon Sep 17 00:00:00 2001 From: Longze Chen Date: Tue, 13 Jan 2026 23:41:43 -0500 Subject: [PATCH] Mark notifications that failed to render as fake sent --- notifications/tasks.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/notifications/tasks.py b/notifications/tasks.py index d5ab58e807b..ee96ba89d2d 100644 --- a/notifications/tasks.py +++ b/notifications/tasks.py @@ -33,6 +33,11 @@ def safe_render_notification(notifications, email_task): email_task.error_message = f'Error rendering notification {notification.id}: {str(e)} \n' email_task.save() failed_notifications.append(notification.id) + # Mark notifications that failed to render as fake sent + # Use 1000/12/31 to distinguish itself from another type of fake sent 1000/1/1 + log_message(f'Error rendering notification, mark as fake sent: [notification_id={notification.id}]') + notification.sent = datetime(1000, 12, 31) + notification.save() continue rendered_notifications.append(rendered)