Skip to content

Commit e9f8c31

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 25233a9 commit e9f8c31

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
@@ -241,7 +241,7 @@ func CreateTeam(ctx *context.APIContext) {
241241
return
242242
}
243243

244-
apiTeam, err := convert.ToTeam(ctx, team)
244+
apiTeam, err := convert.ToTeam(ctx, team, true)
245245
if err != nil {
246246
ctx.InternalServerError(err)
247247
return

0 commit comments

Comments
 (0)