fix(compare): date report cards with their own inspection date, never the legacy one

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0146VHeLAWjDVE2B5uU67jCB
This commit is contained in:
Tudor
2026-07-16 14:48:17 +01:00
co-authored by Claude Fable 5
parent e00a1b38a8
commit 9773483221
6 changed files with 79 additions and 2 deletions
+5
View File
@@ -617,6 +617,11 @@ def _ofsted_block(o, urn: int) -> dict:
block = {
"framework": o.framework,
"inspection_date": o.inspection_date.isoformat() if o.inspection_date else None,
"rc_inspection_date": (
o.rc_inspection_date.isoformat()
if getattr(o, "rc_inspection_date", None)
else None
),
"inspection_type": o.inspection_type,
"overall_effectiveness": overall,
"grade_source": grade_source,