From e9f8c31c202674e4e9427f291aaf746906891fc5 Mon Sep 17 00:00:00 2001 From: Dionysios Kakouris <1369451+memphis88@users.noreply.github.com> Date: Thu, 21 Sep 2023 10:09:59 +0200 Subject: [PATCH] Fix organization field being null in POST /orgs/{orgid}/teams (#27150) Similarly to the fix in https://github.com/go-gitea/gitea/pull/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`). --- routers/api/v1/org/team.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/api/v1/org/team.go b/routers/api/v1/org/team.go index 0e11acc901fb4..6b0c91ef34578 100644 --- a/routers/api/v1/org/team.go +++ b/routers/api/v1/org/team.go @@ -241,7 +241,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