From f477e6dc7d85340adb226996e7bcadb61d2bf4e4 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Fri, 24 Jul 2026 15:37:39 +0000 Subject: [PATCH] =?UTF-8?q?Carry=20the=20client=5Fbooking=5Freference=20on?= =?UTF-8?q?=20the=20Abri=20trigger=20message=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- applications/abri/abri_trigger_request.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/applications/abri/abri_trigger_request.py b/applications/abri/abri_trigger_request.py index 003fe47bb..50deed371 100644 --- a/applications/abri/abri_trigger_request.py +++ b/applications/abri/abri_trigger_request.py @@ -45,12 +45,15 @@ class AbriTriggerRequest(BaseModel): # OpenHousing's bookable resource for the survey; required by the log and # amend flows. Empty string is also rejected by Abri, so not allowed here third_party_surveyor_identifier: Optional[str] = None + # The Job Number OpenHousing returns on a successful log. Present means the + # job exists (amend/abandon); absent means it was never logged (or the + # reference was lost). Passed through, not required by any flow. A blank + # value carries no Job Number, so it is normalised to missing. + client_booking_reference: Optional[str] = None - @field_validator("third_party_surveyor_identifier") + @field_validator("third_party_surveyor_identifier", "client_booking_reference") @classmethod - def _blank_surveyor_identifier_is_missing( - cls, value: Optional[str] - ) -> Optional[str]: + def _blank_is_missing(cls, value: Optional[str]) -> Optional[str]: if value is not None and not value.strip(): return None return value