Skip to content

Commit a3ac432

Browse files
memphis88GiteaBot
authored andcommitted
Fix organization field being null in POST /orgs/{orgid}/teams (go-gitea#27150)
Similarly to the fix in go-gitea#24694, this addresses the team creation not returning the organization information in the response. This fix is connected to the [issue](https://gitea.com/gitea/terraform-provider-gitea/issues/27) discovered in the terraform provider. Moreover, the [documentation](https://docs.gitea.com/api/1.20/#tag/organization/operation/orgCreateTeam) suggests that the response body should include the `organization` field (currently being `null`).
1 parent c3b7120 commit a3ac432

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/api/v1/org/team.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ func CreateTeam(ctx *context.APIContext) {
248248
return
249249
}
250250

251-
apiTeam, err := convert.ToTeam(ctx, team)
251+
apiTeam, err := convert.ToTeam(ctx, team, true)
252252
if err != nil {
253253
ctx.InternalServerError(err)
254254
return

0 commit comments

Comments
 (0)