diff --git a/repositories/epc/epc_postgres_repository.py b/repositories/epc/epc_postgres_repository.py index 3f4e09b1..60383fd1 100644 --- a/repositories/epc/epc_postgres_repository.py +++ b/repositories/epc/epc_postgres_repository.py @@ -582,6 +582,12 @@ class EpcPostgresRepository(EpcRepository): else None ), multiple_glazed_proportion=p.multiple_glazed_proportion, + # Top-level mirror of sap_ventilation.extract_fans_count (the mapper + # sets both from the same source). The deterministic calculator reads + # the sap_ventilation copy, not this one; reconstruct it from the same + # column anyway so EpcPropertyData round-trips complete, with no + # allow-list exception for a field that trivially mirrors a persisted one. + extract_fans_count=p.ventilation_extract_fans_count, calculation_software_version=p.calculation_software_version, mechanical_vent_duct_placement=p.mechanical_vent_duct_placement, mechanical_vent_duct_insulation=p.mechanical_vent_duct_insulation, diff --git a/tests/repositories/epc/test_epc_persistence_field_coverage.py b/tests/repositories/epc/test_epc_persistence_field_coverage.py index 6f9481d8..4f0c8faa 100644 --- a/tests/repositories/epc/test_epc_persistence_field_coverage.py +++ b/tests/repositories/epc/test_epc_persistence_field_coverage.py @@ -35,10 +35,6 @@ from repositories.epc.epc_postgres_repository import EpcPostgresRepository # ``ClassName.field`` (a single field) or ``ClassName`` (the whole dataclass is # an un-persisted, tracked gap awaiting its FE columns / child table). _UNPERSISTED_ALLOWLIST: dict[str, str] = { - # Redundant top-level field: the calculator reads - # `sap_ventilation.extract_fans_count` (which round-trips via - # `_to_ventilation`), never this top-level duplicate. - "EpcPropertyData.extract_fans_count": "redundant; scoring uses sap_ventilation.extract_fans_count", # Not read by the calculator (dormant); no DB column yet. "EpcPropertyData.air_tightness": "dormant — not read by the calculator; no FE column", "EpcPropertyData.lzc_energy_sources": "dormant — not read by the calculator; no FE column",