diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index 483efbc20..3994ba542 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -69,11 +69,8 @@ func NotebookIndex(ctx *context.Context) { } for i, task := range ciTasks { - if task.Status == string(models.JobRunning) { - ciTasks[i].CanDebug = cloudbrain.CanCreateOrDebugJob(ctx) - } else { - ciTasks[i].CanDebug = false - } + + ciTasks[i].CanDebug = cloudbrain.CanCreateOrDebugJob(ctx) ciTasks[i].CanDel = cloudbrain.CanDeleteJob(ctx, &task.Cloudbrain) }