Skip to content

Commit ce151e6

Browse files
committed
use org id, not template id
1 parent 18f4015 commit ce151e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

coderd/workspaces.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ func (api *API) postUserWorkspaces(rw http.ResponseWriter, r *http.Request) {
447447
// If the caller can find the organization membership in the same org
448448
// as the template, then they can continue.
449449
orgIndex := slices.IndexFunc(mems.Memberships, func(mem httpmw.OrganizationMember) bool {
450-
return mem.OrganizationID == template.ID
450+
return mem.OrganizationID == template.OrganizationID
451451
})
452452
if orgIndex == -1 {
453453
httpapi.ResourceNotFound(rw)

0 commit comments

Comments
 (0)