From e272a39380fe6aa668815936da28287f60db5290 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Thu, 23 Apr 2026 10:43:57 +0000 Subject: [PATCH] =?UTF-8?q?additional=20fields=20mapped=20from=20pdf=204?= =?UTF-8?q?=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- datatypes/epc/domain/mapper.py | 8 +++++--- datatypes/epc/domain/tests/test_from_site_notes.py | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/datatypes/epc/domain/mapper.py b/datatypes/epc/domain/mapper.py index a554f5cd..156a205c 100644 --- a/datatypes/epc/domain/mapper.py +++ b/datatypes/epc/domain/mapper.py @@ -1557,10 +1557,11 @@ def _map_sap_heating( ) _ELECTRIC_SYSTEM_TYPES = {"electric storage heaters", "electric underfloor heating"} + _raw_fuel = main.fuel.split(", ")[0] if main.fuel else "" fuel_type = ( - main.fuel - if main.fuel - else ("Electricity" if main.system_type.lower() in _ELECTRIC_SYSTEM_TYPES else main.fuel) + _raw_fuel + if _raw_fuel + else ("Electricity" if main.system_type.lower() in _ELECTRIC_SYSTEM_TYPES else _raw_fuel) ) return SapHeating( @@ -1580,6 +1581,7 @@ def _map_sap_heating( secondary_heating_type=heating.secondary_heating.secondary_system, shower_outlets=shower_outlets, cylinder_size=heating.water_heating.cylinder_size if heating.water_heating.cylinder_size != "No Cylinder" else None, + cylinder_insulation_type=heating.water_heating.insulation_type, cylinder_insulation_thickness_mm=heating.water_heating.insulation_thickness_mm, immersion_heating_type=heating.water_heating.immersion_type, ) diff --git a/datatypes/epc/domain/tests/test_from_site_notes.py b/datatypes/epc/domain/tests/test_from_site_notes.py index 479c6e4f..57c8e45a 100644 --- a/datatypes/epc/domain/tests/test_from_site_notes.py +++ b/datatypes/epc/domain/tests/test_from_site_notes.py @@ -385,6 +385,7 @@ class TestFromSiteNotesExample1: ], has_fixed_air_conditioning=False, cylinder_size="Normal (90-130 litres)", + cylinder_insulation_type="Factory fitted", cylinder_insulation_thickness_mm=12, shower_outlets=ShowerOutlets( shower_outlet=ShowerOutlet(shower_outlet_type="Non-Electric Shower"),