diff --git a/backend/documents_parser/extractor.py b/backend/documents_parser/extractor.py index 334cf08cc..767e8c731 100644 --- a/backend/documents_parser/extractor.py +++ b/backend/documents_parser/extractor.py @@ -685,10 +685,19 @@ class PasHubRdSapSiteNotesExtractor: height = self._get_in(data, f"{prefix} height:") if length is None and height is None: return None + # "{prefix}: Are you able to provide details of the insulation …?" — + # the question wraps onto a second PDF line, so the Yes/No sits at + # offset 2 from the stable first-line key. Absent on legacy forms. + known_raw = self._get_in( + data, f"{prefix}: Are you able to provide details of the", offset=2 + ) return RoomInRoofSurfaceDetail( length_m=float(length.split()[0]) if length else None, height_m=float(height.split()[0]) if height else None, gable_type=self._get_in(data, f"{prefix} type:") if with_type else None, + insulation_known=( + None if known_raw is None else known_raw.lower() == "yes" + ), ) def _parse_room_in_roof(self, data: List[str]) -> Optional[RoomInRoofDetail]: