Skip to content

Commit

Permalink
Fix organization field being null in POST /orgs/{orgid}/teams (#27150) (
Browse files Browse the repository at this point in the history
#27163)

Backport #27150 by @memphis88

Similarly to the fix in #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`).

Co-authored-by: Dionysios Kakouris <1369451+memphis88@users.noreply.github.com>
  • Loading branch information
GiteaBot and memphis88 authored Sep 21, 2023
1 parent c3b7120 commit 0ca2332
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routers/api/v1/org/team.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func CreateTeam(ctx *context.APIContext) {
return
}

apiTeam, err := convert.ToTeam(ctx, team)
apiTeam, err := convert.ToTeam(ctx, team, true)
if err != nil {
ctx.InternalServerError(err)
return
Expand Down

0 comments on commit 0ca2332

Please sign in to comment.