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-08-21 11:27:00 +01:00
parent 913cf5e12d
commit 34ac7cb6c0

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):