mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
The `from_rdsap_schema_17_0` path hardcoded `sap_heating.secondary_heating_type` and `secondary_fuel_type` to None, unlike every other API path (19.0/20.0/…), which read them from `schema.sap_heating`. The gov EPC API *does* populate a secondary heating SAP code for a genuine fixed secondary (e.g. 691 "electric room heaters", 694), so the hardcode silently discarded it. Because `recommend_secondary_heating_removal` gates purely on `sap_heating.secondary_heating_type`, any 17.0 cert carrying a fixed secondary would never get its removal recommendation. Surfaced while auditing portfolio 814's recommendations; 814 has 17.0 certs but none with a fixed secondary, so the defect was latent there — this restores parity with the other paths so it cannot bite. Mirrors the 19.0 path exactly (secondary_fuel_type via `_api_secondary_fuel_type`). Adds a regression guard that injects a fixed secondary into a real 17.0 cert and asserts the code survives the mapping. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| epc | ||
| __init__.py | ||