Skip to content

Commit 542adf5

Browse files
Fix organization field being null in GET /api/v1/teams/{id} (#24694)
Enabled the organization loading flag. - Fixes #20399 # Before ```json { ... "description": "", "organization": null, "includes_all_repositories": true, "permission": "owner", ... } ``` # After ```json { ... "description": "", "organization": { "id": 2, "name": "bigorg", "full_name": "", "avatar_url": "https://3000-yardenshoham-gitea-3gfrlc9gn4h.ws-us96b.gitpod.io/avatars/e2649b0c016d9102664a7d4349503eb9", "description": "", "website": "", "location": "", "visibility": "public", "repo_admin_change_team_access": true, "username": "bigorg" }, "includes_all_repositories": true, "permission": "owner", ... } ``` Signed-off-by: Yarden Shoham <[email protected]> Co-authored-by: Giteabot <[email protected]>
1 parent a94a8d0 commit 542adf5

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
@@ -126,7 +126,7 @@ func GetTeam(ctx *context.APIContext) {
126126
// "200":
127127
// "$ref": "#/responses/Team"
128128

129-
apiTeam, err := convert.ToTeam(ctx, ctx.Org.Team)
129+
apiTeam, err := convert.ToTeam(ctx, ctx.Org.Team, true)
130130
if err != nil {
131131
ctx.InternalServerError(err)
132132
return

0 commit comments

Comments
 (0)