Carry the client_booking_reference on the Abri trigger message 🟩

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-07-24 15:37:39 +00:00
parent 92fc9052e5
commit f477e6dc7d

View file

@ -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