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
This commit is contained in:
Leo Hemsted
2019-11-29 15:27:56 +00:00
parent 913cf5e12d
commit 34ac7cb6c0
+1 -1
View File
@@ -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):