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