diff --git a/cmd/http.go b/cmd/http.go index e1d9737..a7d7129 100644 --- a/cmd/http.go +++ b/cmd/http.go @@ -115,7 +115,7 @@ func handlePostJob(w http.ResponseWriter, r *http.Request) { return } - if !reValidateName.Match([]byte(req.JobID)) { + if req.JobID != "" && !reValidateName.Match([]byte(req.JobID)) { sendErrorResponse(w, "invalid characters in the `job_id`", http.StatusBadRequest) return }