From 2fdac85d3171994317c6ea46260de00e72c06d7b Mon Sep 17 00:00:00 2001 From: Michael Panzlaff Date: Thu, 27 Feb 2025 14:04:54 +0100 Subject: [PATCH] fix: Do not allow to start a job with a state != running --- internal/api/rest.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/api/rest.go b/internal/api/rest.go index 2921ba5..704f91a 100644 --- a/internal/api/rest.go +++ b/internal/api/rest.go @@ -772,9 +772,8 @@ func (api *RestApi) startJob(rw http.ResponseWriter, r *http.Request) { return } - if req.State == "" { - req.State = schema.JobStateRunning - } + req.State = schema.JobStateRunning + if err := importer.SanityChecks(&req.BaseJob); err != nil { handleError(err, http.StatusBadRequest, rw) return