Model/datatypes/epc
Jun-te Kim ae81a81e79 Drop lodged building parts that carry no construction age band
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>
2026-06-24 11:30:23 +00:00
..
domain Drop lodged building parts that carry no construction age band 2026-06-24 11:30:23 +00:00
loaders demo generated for use in address2uprn 2026-05-08 14:48:15 +00:00
schema Merge pull request #1291 from Hestia-Homes/fix/full-sap-has-hot-water-cylinder 2026-06-24 11:59:03 +01:00
search bolstering testing 2026-04-28 13:46:09 +00:00
surveys fix(ventilation): read Blower Door AP50 pressure test (Summary) 2026-06-16 23:18:17 +00:00
__init__.py testing out rebaselining 2026-02-12 22:25:03 +00:00
construction_age_band.py testing out rebaselining 2026-02-12 22:25:03 +00:00
efficiency.py beginning to assembly the parity class 2026-02-04 18:34:59 +00:00
floor.py preparing partiy class 2026-02-05 08:54:27 +00:00
fuel.py beginning to assembly the parity class 2026-02-04 18:34:59 +00:00
heating_controls.py beginning to assembly the parity class 2026-02-04 18:34:59 +00:00
hotwater.py beginning to assembly the parity class 2026-02-04 18:34:59 +00:00
main_heating.py beginning to assembly the parity class 2026-02-04 18:34:59 +00:00
property_type_built_form.py beginning to assembly the parity class 2026-02-04 18:34:59 +00:00
roof.py beginning to assembly the parity class 2026-02-04 18:34:59 +00:00
walls.py beginning to assembly the parity class 2026-02-04 18:34:59 +00:00
windows.py testing out rebaselining 2026-02-12 22:25:03 +00:00