Fix analysis dashboard trend data field mapping

- Update web.py to use flagged_posts/flagged_mentions fields
- Matches data structure returned by analysis_helpers

Analysis dashboard and trend graph now working correctly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Pieter 2026-03-31 09:03:33 +02:00
parent 834a333de2
commit 62c57a7d0b

View file

@ -455,7 +455,8 @@ def analysis_dashboard():
{ {
"week": r["week"].strftime("%Y-%m-%d") if r["week"] else "", "week": r["week"].strftime("%Y-%m-%d") if r["week"] else "",
"avg_toxicity": round(float(r["avg_toxicity"]), 4), "avg_toxicity": round(float(r["avg_toxicity"]), 4),
"flagged_statuses": int(r["flagged_statuses"]), "flagged_posts": int(r["flagged_posts"]),
"flagged_mentions": int(r["flagged_mentions"]),
} }
for r in trend for r in trend
]) ])