fix: Do not allow to start a job with a state != running

This commit is contained in:
Michael Panzlaff 2025-02-27 14:04:54 +01:00
parent b731395689
commit 2fdac85d31

View File

@ -772,9 +772,8 @@ func (api *RestApi) startJob(rw http.ResponseWriter, r *http.Request) {
return return
} }
if req.State == "" { req.State = schema.JobStateRunning
req.State = schema.JobStateRunning
}
if err := importer.SanityChecks(&req.BaseJob); err != nil { if err := importer.SanityChecks(&req.BaseJob); err != nil {
handleError(err, http.StatusBadRequest, rw) handleError(err, http.StatusBadRequest, rw)
return return