mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
2 modelling_e2e properties (LODGED, e.g. uprn 100061733327 cert
3235-4627-4400-0610-7292 / uprn 100020397707 cert 8081-7022-7669-5038-0996)
failed with NotNullViolation on epc_building_part.construction_age_band.
The certs lodge a leading building part with floor geometry but no construction
descriptors — {floor_area, room_height, double_glazed, glazed_perimeter}, no age
band / identifier / wall / roof. A glazed-perimeter conservatory-shell / lodging
artifact. It maps to construction_age_band=None → violates the NOT-NULL column,
and the engine reads parts[0].construction_age_band as the primary era (so the
junk part also poisoned the calc's primary age band).
Fix: from_api_response drops building parts with no construction_age_band, but
only when banded parts remain (a fully band-less cert is left untouched). The
real Main + Extension parts survive and parts[0] becomes the real Main Dwelling.
Verified both certs now map with only their banded parts. Regression test +
mapper-corpus / accuracy gates green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| domain | ||
| loaders | ||
| schema | ||
| search | ||
| surveys | ||
| __init__.py | ||
| construction_age_band.py | ||
| efficiency.py | ||
| floor.py | ||
| fuel.py | ||
| heating_controls.py | ||
| hotwater.py | ||
| main_heating.py | ||
| property_type_built_form.py | ||
| roof.py | ||
| walls.py | ||
| windows.py | ||