preserve job state in StopJob

This commit is contained in:
Pay Giesselmann 2022-11-24 14:28:57 +01:00
parent e4a1422e05
commit f736b7ff68

View File

@ -517,7 +517,7 @@ func (api *RestApi) checkAndHandleStopJob(rw http.ResponseWriter, job *schema.Jo
if req.State != "" && !req.State.Valid() {
handleError(fmt.Errorf("invalid job state: %#v", req.State), http.StatusBadRequest, rw)
return
} else {
} else if req.State == "" {
req.State = schema.JobStateCompleted
}