start writing message ids to the notifications table

This commit is contained in:
Kenneth Kehl
2024-12-13 07:30:41 -08:00
parent b993ed9fe0
commit 5ce31c78fd
2 changed files with 14 additions and 0 deletions

View File

@@ -110,6 +110,16 @@ def _update_notification_status(
return notification
@autocommit
def update_notification_message_id(notification_id, message_id):
stmt = (
update(Notification)
.where(Notification.id == notification_id)
.values({"message_id": message_id})
)
db.session.execute(stmt)
@autocommit
def update_notification_status_by_id(
notification_id, status, sent_by=None, provider_response=None, carrier=None