From 90b407241f971885d5d4c0c3aa9c4c9c001ef967 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Fri, 11 Oct 2024 09:38:12 -0700 Subject: [PATCH] fix core daos --- app/dao/notifications_dao.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/dao/notifications_dao.py b/app/dao/notifications_dao.py index 4d1fee9d1..ca1646467 100644 --- a/app/dao/notifications_dao.py +++ b/app/dao/notifications_dao.py @@ -466,7 +466,7 @@ def dao_timeout_notifications(cutoff_time, limit=100000): update(Notification) .filter(Notification.id.in_([n.id for n in notifications])) .values( - {"status": new_status, "updated_at": updated_at}, synchronize_session=False + {"status": new_status, "updated_at": updated_at} ) ) db.session.execute(stmt) @@ -482,16 +482,16 @@ def dao_update_notifications_by_reference(references, update_dict): .filter(Notification.reference.in_(references)) .values(update_dict) ) - updated_count = db.stmt.execute(stmt) + updated_count = db.session.execute(stmt) updated_history_count = 0 if updated_count != len(references): stmt = ( select(NotificationHistory) .filter(NotificationHistory.reference.in_(references)) - .values(update_dict, synchronize_session=False) + .values(update_dict) ) - updated_history_count = db.stmt.execute(stmt) + updated_history_count = db.session.execute(stmt) return updated_count, updated_history_count