mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
A 2026-register cert (4519-9056-4002-0222-4802) omits the top-level post_town entirely (its town sits only in address_line_3 "BARNSTAPLE"). RdSapSchema21_0_x declares post_town as a required no-default field, so from_dict raised "missing required field 'post_town'" and blocked the whole cert from computing. post_town is address metadata the SAP cascade never reads (no consumer in domain/sap10_calculator/), so default an absent post_town to "" in a from_api_response pre-processor (mirroring _normalize_shower_outlets) — inert for the calculation, keeps the cert mappable. The schema dataclass can't simply give post_town a default: it is a plain (non-kw_only) dataclass with 57 required fields after post_town, so a mid-list default would break field ordering. Validated: cert 4519 now maps (post_town="") and computes SAP cont 74.68 vs lodged 75. §4 suite 2392 passed; mapper.py pyright unchanged at 32; new tests suppress reportPrivateUsage (net-zero). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| epc | ||
| magicplan | ||
| __init__.py | ||
| datatypes.py | ||
| enums.py | ||