From ccd23233e90dde825fdd76e4216bfad140989f1e Mon Sep 17 00:00:00 2001 From: Ritwik Date: Tue, 4 Aug 2026 08:02:17 +0200 Subject: [PATCH] Set a message when cancelling pending tasks Cancelling a job moved its pending tasks to CANCELED but left the message field untouched, so the UI kept showing whatever the task last reported. Set an explicit message so the reason for the status is visible. Redoes #290, whose branch no longer merges. --- adit/core/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adit/core/views.py b/adit/core/views.py index 4feeccda..d437298b 100644 --- a/adit/core/views.py +++ b/adit/core/views.py @@ -232,7 +232,7 @@ def post(self, request: AuthenticatedHttpRequest, *args, **kwargs) -> HttpRespon dicom_task.queued_job_id = None dicom_task.save(update_fields=["queued_job_id"]) app.job_manager.cancel_job_by_id(queued_job_id, delete_job=True) - pending_tasks.update(status=DicomTask.Status.CANCELED) + pending_tasks.update(status=DicomTask.Status.CANCELED, message="Task manually canceled") in_progress_tasks = job.tasks.filter(status=DicomTask.Status.IN_PROGRESS) for dicom_task in in_progress_tasks: