From 34ac7cb6c07186db8b4430989d964616ea7912e8 Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Wed, 21 Aug 2019 11:27:00 +0100 Subject: [PATCH] only commit once, rather than for every insert if we insert a valid row, that'll mean we properly roll back the delete of old data --- app/dao/fact_notification_status_dao.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/dao/fact_notification_status_dao.py b/app/dao/fact_notification_status_dao.py index 1a3166f85..43145ad59 100644 --- a/app/dao/fact_notification_status_dao.py +++ b/app/dao/fact_notification_status_dao.py @@ -108,7 +108,7 @@ def update_fact_notification_status(data, process_day): notification_count=row.notification_count, ) db.session.connection().execute(stmt) - db.session.commit() + db.session.commit() def fetch_notification_status_for_service_by_month(start_date, end_date, service_id):