feat(api): compare school_info carries GIAS facts for the community section
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0146VHeLAWjDVE2B5uU67jCB
This commit is contained in:
@@ -706,6 +706,15 @@ async def compare_schools(
|
|||||||
"phase": latest.get("phase", ""),
|
"phase": latest.get("phase", ""),
|
||||||
"attainment_8_score": float(latest["attainment_8_score"]) if pd.notna(latest.get("attainment_8_score")) else None,
|
"attainment_8_score": float(latest["attainment_8_score"]) if pd.notna(latest.get("attainment_8_score")) else None,
|
||||||
"rwm_expected_pct": float(latest["rwm_expected_pct"]) if pd.notna(latest.get("rwm_expected_pct")) else None,
|
"rwm_expected_pct": float(latest["rwm_expected_pct"]) if pd.notna(latest.get("rwm_expected_pct")) else None,
|
||||||
|
# GIAS facts the compare "Who goes there" section needs
|
||||||
|
# (same fields the detail endpoint exposes)
|
||||||
|
"religious_denomination": convert_to_native(latest.get("religious_denomination")),
|
||||||
|
"age_range": convert_to_native(latest.get("age_range")),
|
||||||
|
"gender": convert_to_native(latest.get("gender")),
|
||||||
|
"has_sixth_form": convert_to_native(latest.get("has_sixth_form")),
|
||||||
|
"capacity": convert_to_native(latest.get("capacity")),
|
||||||
|
"gias_total_pupils": convert_to_native(latest.get("gias_total_pupils")),
|
||||||
|
"trust_name": convert_to_native(latest.get("trust_name")),
|
||||||
},
|
},
|
||||||
"yearly_data": clean_for_json(school_data),
|
"yearly_data": clean_for_json(school_data),
|
||||||
**supplementary_by_urn.get(urn, dict(_EMPTY_SUPPLEMENTARY)),
|
**supplementary_by_urn.get(urn, dict(_EMPTY_SUPPLEMENTARY)),
|
||||||
|
|||||||
Reference in New Issue
Block a user