mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-27 23:35:01 +00:00
Strict-raise on an unrecognised PasHub main-heating Fuel label 🟩
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1fead6e4c7
commit
a8afcd1b3d
1 changed files with 7 additions and 2 deletions
|
|
@ -7070,10 +7070,15 @@ _PASHUB_MAIN_FUEL_TO_SAP10: Dict[str, int] = {
|
|||
def _pashub_main_fuel_code(fuel_label: str) -> Union[int, str]:
|
||||
"""Resolve a PasHub surveyed main-heating Fuel label to a SAP10 fuel code
|
||||
at the mapper boundary (ADR-0015). A genuinely blank label is the "no main
|
||||
heating" shape and passes through unchanged."""
|
||||
heating" shape and passes through unchanged; a non-empty label the lookup
|
||||
does not cover strict-raises `UnmappedPasHubLabel` so the gap is fixed here,
|
||||
never silently mis-billed downstream."""
|
||||
if not fuel_label:
|
||||
return fuel_label
|
||||
return _PASHUB_MAIN_FUEL_TO_SAP10.get(fuel_label, fuel_label)
|
||||
code = _PASHUB_MAIN_FUEL_TO_SAP10.get(fuel_label)
|
||||
if code is None:
|
||||
raise UnmappedPasHubLabel("main fuel", fuel_label)
|
||||
return code
|
||||
|
||||
|
||||
def _resolve_elmhurst_underfloor_subtype(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue