diff --git a/datatypes/epc/domain/mapper.py b/datatypes/epc/domain/mapper.py index 32765df1..83a0a9eb 100644 --- a/datatypes/epc/domain/mapper.py +++ b/datatypes/epc/domain/mapper.py @@ -1634,11 +1634,17 @@ class EpcPropertyDataMapper: for w in schema.sap_windows if not _api_is_roof_window(w) ], + # Empty โ†’ None (not []) so "no roof windows" has the single + # canonical representation the domain field defaults to + # (`Optional[List] = None`), matching the 21.0.0 path and the + # persistence round-trip (roof windows aren't yet stored โ€” doc + # ยง2.4 โ€” so a reloaded cert always reads None here). sap_roof_windows=[ _api_sap_roof_window(w) for w in schema.sap_windows if _api_is_roof_window(w) - ], + ] + or None, # SAP energy source sap_energy_source=SapEnergySource( mains_gas=es.mains_gas == "Y",