avoid message is none scenario

This commit is contained in:
Kenneth Kehl
2024-12-13 08:43:23 -08:00
parent 0d280d608a
commit 26e53a80ba
2 changed files with 3 additions and 2 deletions

View File

@@ -110,7 +110,6 @@ def _update_notification_status(
return notification
@autocommit
def update_notification_message_id(notification_id, message_id):
stmt = (
update(Notification)
@@ -118,6 +117,7 @@ def update_notification_message_id(notification_id, message_id):
.values({"message_id": message_id})
)
db.session.execute(stmt)
db.session.commit()
@autocommit