mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-22 08:48:38 +00:00
Abri amend_job omits the surveyor resource so amendments cannot clobber Abri-side reassignments 🟩
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
b70afc8d9d
commit
e363a1105a
1 changed files with 10 additions and 7 deletions
|
|
@ -49,15 +49,18 @@ class AbriClient:
|
||||||
return self._parse_job_logged(outcome)
|
return self._parse_job_logged(outcome)
|
||||||
|
|
||||||
def amend_job(self, request: AmendJobRequest) -> AmendJobResult:
|
def amend_job(self, request: AmendJobRequest) -> AmendJobResult:
|
||||||
|
parameters = [
|
||||||
|
("job_no", request.job_no),
|
||||||
|
("action", "amend"),
|
||||||
|
("appointment_date", request.appointment_date.strftime("%d/%m/%Y")),
|
||||||
|
("appointment_time", request.appointment_time),
|
||||||
|
]
|
||||||
|
if request.resource is not None:
|
||||||
|
parameters.append(("resource", request.resource))
|
||||||
|
|
||||||
outcome = self._exchange(
|
outcome = self._exchange(
|
||||||
request_type="amendoptiappt",
|
request_type="amendoptiappt",
|
||||||
parameters=[
|
parameters=parameters,
|
||||||
("job_no", request.job_no),
|
|
||||||
("action", "amend"),
|
|
||||||
("appointment_date", request.appointment_date.strftime("%d/%m/%Y")),
|
|
||||||
("appointment_time", request.appointment_time),
|
|
||||||
("resource", request.resource or ""),
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if isinstance(outcome, AbriRequestRejected):
|
if isinstance(outcome, AbriRequestRejected):
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue