From e363a1105ac75d9bf72d02ef2ed79b4e6eb22e6d Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Fri, 3 Jul 2026 16:21:06 +0000 Subject: [PATCH] =?UTF-8?q?Abri=20amend=5Fjob=20omits=20the=20surveyor=20r?= =?UTF-8?q?esource=20so=20amendments=20cannot=20clobber=20Abri-side=20reas?= =?UTF-8?q?signments=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- infrastructure/abri/abri_client.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/infrastructure/abri/abri_client.py b/infrastructure/abri/abri_client.py index 3f9cc19b0..4cfe51d7e 100644 --- a/infrastructure/abri/abri_client.py +++ b/infrastructure/abri/abri_client.py @@ -49,15 +49,18 @@ class AbriClient: return self._parse_job_logged(outcome) 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( request_type="amendoptiappt", - 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 ""), - ], + parameters=parameters, ) if isinstance(outcome, AbriRequestRejected):