Auto-commit local changes before build (2026-03-20 11:47:41)

This commit is contained in:
Ivo Oskamp 2026-03-20 11:47:41 +01:00
parent 924a012a7d
commit 6dfbab3354

View File

@ -259,9 +259,11 @@ def upsert_cloud_connect_report(mail_message_id: int, html_body: str) -> dict:
existing = JobRun.query.filter_by(job_id=job.id, external_id=external_id).first()
if existing:
# Update status in case re-import happens same day with different result.
# Update status and object links in case re-import has a different result.
existing.status = row["status"]
db.session.add(existing)
db.session.flush()
_persist_cc_objects(row, job.customer_id, job.id, existing.id, report_dt)
counters["skipped"] += 1
counters["linked"] += 1
continue