Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fe725f7

Browse files
authored
fix: Allow to stop or remove workspaces using rich and old parameters (#6099)
* fix: Allow to stop or remove workspaces using rich and old parameters * Fix
1 parent 1617268 commit fe725f7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

coderd/workspacebuilds.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,8 @@ func (api *API) postWorkspaceBuilds(rw http.ResponseWriter, r *http.Request) {
518518
return
519519
}
520520

521-
if len(legacyParameters) > 0 && len(parameters) > 0 {
521+
if createBuild.Transition == codersdk.WorkspaceTransitionStart &&
522+
len(legacyParameters) > 0 && len(parameters) > 0 {
522523
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
523524
Message: "Rich parameters can't be used together with legacy parameters.",
524525
})

0 commit comments

Comments
 (0)