job kill fix

frdel committed May 3, 2025 at 21:06 UTC 47a3dee30fdc6a3f742cb892f6e8ba065fae71b0
1 file changed +4 -3
webui/js/scheduler.js
+4 -3
@@ -955,6 +955,10 @@ const fullComponentImplementation = function() {
955 }
956
957 try {
958 +
959 + // if we delete selected context, switch to another first
960 + switchFromContext(taskId);
961 +
962 const response = await fetch('/scheduler_task_delete', {
963 method: 'POST',
964 headers: {
@@ -972,9 +976,6 @@ const fullComponentImplementation = function() {
976 }
977
978 showToast('Task deleted successfully', 'success');
975 -
976 - // if we deleted selected context, switch to another
977 - switchFromContext(taskId);
979
980 // If we were viewing the detail of the deleted task, close the detail view
981 if (this.selectedTaskForDetail && this.selectedTaskForDetail.uuid === taskId) {