Merge pull request #2567 from zheng1/refactor_op

Bugfix: create repo have no workspace
This commit is contained in:
KubeSphere CI Bot
2020-07-23 21:45:50 +08:00
committed by GitHub

View File

@@ -753,6 +753,14 @@ func (h *openpitrixHandler) CreateRepo(req *restful.Request, resp *restful.Respo
api.HandleBadRequest(resp, nil, err)
return
}
if req.PathParameter("workspace") != "" {
if createRepoRequest.Workspace == nil {
createRepoRequest.Workspace = new(string)
}
*createRepoRequest.Workspace = req.PathParameter("workspace")
}
validate, _ := strconv.ParseBool(req.QueryParameter("validate"))
var result interface{}