fix: pass prediction_json and actual_json through to snapshot events

The filtered event dict was built with explicit fields and omitted these two columns,
so the frontend always received null despite the DB having valid data.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
OpenSquared
2026-06-29 23:34:32 +02:00
parent b33d06cb97
commit 5e37cd81a2

View File

@@ -624,6 +624,8 @@ def _get_relevant_events(
"surprise_pct": ev.get("surprise_pct"),
"unit": ev.get("unit") or None,
"absorption_pct": ev.get("absorption_pct"),
"prediction_json": ev.get("prediction_json") or None,
"actual_json": ev.get("actual_json") or None,
})
# Sort by start_date asc for timeline display, cap at 30