mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-27 23:35:01 +00:00
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:
parent
92fc9052e5
commit
f477e6dc7d
1 changed files with 7 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue