From 958861df59503eac58b6f75bc32e30b9f91bae8c Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Fri, 11 Oct 2024 09:59:16 -0700 Subject: [PATCH] fix core daos --- app/dao/notifications_dao.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/dao/notifications_dao.py b/app/dao/notifications_dao.py index d1c0d7202..1fbb637c9 100644 --- a/app/dao/notifications_dao.py +++ b/app/dao/notifications_dao.py @@ -482,7 +482,7 @@ def dao_update_notifications_by_reference(references, update_dict): .filter(Notification.reference.in_(references)) .values(update_dict) ) - updated_count = db.session.execute(stmt) + updated_count = db.session.execute(stmt).scalar() or 0 updated_history_count = 0 if updated_count != len(references): @@ -491,7 +491,7 @@ def dao_update_notifications_by_reference(references, update_dict): .filter(NotificationHistory.reference.in_(references)) .values(update_dict) ) - updated_history_count = db.session.execute(stmt) + updated_history_count = db.session.execute(stmt).scalar() or 0 return updated_count, updated_history_count