diff --git a/datatypes/epc/domain/mapper.py b/datatypes/epc/domain/mapper.py index 1985db439..957573249 100644 --- a/datatypes/epc/domain/mapper.py +++ b/datatypes/epc/domain/mapper.py @@ -5990,6 +5990,11 @@ def _map_main_building_part( return SapBuildingPart( identifier=BuildingPartIdentifier.MAIN, construction_age_band=_extract_age_band(main.age_range), + # PasHub surveys never lodge a basement wall; pin the flag so a + # "System Build" wall (code 6, which doubles as the gov-API basement + # sentinel) is not silently routed through the basement wall/floor + # cascade (issue #1590 bug 7). + wall_is_basement=False, wall_construction=_pashub_wall_construction_int( main.walls_construction_type ), @@ -6021,6 +6026,11 @@ def _map_extension_building_part( return SapBuildingPart( identifier=BuildingPartIdentifier.extension(ext_c.id), construction_age_band=_extract_age_band(ext_c.age_range), + # PasHub surveys never lodge a basement wall; pin the flag so a + # "System Build" wall (code 6, which doubles as the gov-API basement + # sentinel) is not silently routed through the basement wall/floor + # cascade (issue #1590 bug 7). + wall_is_basement=False, wall_construction=_pashub_wall_construction_int( ext_c.walls_construction_type ), diff --git a/datatypes/epc/domain/tests/test_from_site_notes.py b/datatypes/epc/domain/tests/test_from_site_notes.py index 151fbbf1e..42f8e62bb 100644 --- a/datatypes/epc/domain/tests/test_from_site_notes.py +++ b/datatypes/epc/domain/tests/test_from_site_notes.py @@ -1145,6 +1145,7 @@ class TestFromSiteNotesExample1: SapBuildingPart( identifier=BuildingPartIdentifier.MAIN, construction_age_band="I", + wall_is_basement=False, # PasHub never lodges a basement wall wall_construction=4, # "Cavity" → SAP10 code 4 (WALL_CAVITY) wall_insulation_type=4, # "As built" → SAP10 code 4 (as built/assumed) wall_thickness_measured=True,