mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-03-04 05:55:56 +01:00
fix: Do not allow to start a job with a state != running
This commit is contained in:
parent
b731395689
commit
2fdac85d31
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user