From 3461b544982563a2ad849d5a628de1bec0e2830b Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Tue, 30 Jun 2026 13:34:57 +0000 Subject: [PATCH] =?UTF-8?q?Mapper=20falls=20back=20to=20legacy=20trickle?= =?UTF-8?q?=20vent=20label=20for=20pre-existing=20API=20responses=20?= =?UTF-8?q?=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- domain/magicplan/mapper.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/domain/magicplan/mapper.py b/domain/magicplan/mapper.py index 2aa03421c..6d7d5f422 100644 --- a/domain/magicplan/mapper.py +++ b/domain/magicplan/mapper.py @@ -99,8 +99,16 @@ def _map_window_ventilation( opening_type=_try_get_str_value("Opening Type"), num_openings=_try_get_int_value("Number of Openings (In Same Window)"), pct_openable=_try_get_int_value("% of Window Openable"), - trickle_vent_area_mm2=_try_get_int_value( - "Total Trickle Vent Effective Area (mm2) (No Code Then Width x Height)" + trickle_vent_area_mm2=next( + ( + v + for label in [ + "Total Trickle Vent Effective Area (mm2) (No Code Then Width x Height)", + "Trickle Vent Effective Area (mm2) (No Code Then Width x Height)", + ] + if (v := _try_get_int_value(label)) is not None + ), + None, ), num_trickle_vents=_try_get_int_value("No. of Trickle Vents"), )