]> source.dussan.org Git - gitea.git/commit
Fix `organization` field being `null` in `GET /api/v1/teams/{id}` (#24694) (#24696)
authorGiteabot <teabot@gitea.io>
Sat, 13 May 2023 19:01:54 +0000 (15:01 -0400)
committerGitHub <noreply@github.com>
Sat, 13 May 2023 19:01:54 +0000 (21:01 +0200)
commitda1c38dd477afc555fd428441c6582b8ea1468e2
tree35dc79c6679259c8329ff7843c9095d0c8569ec9
parentaa984f21fa293cc43a9b3abcea5aedeb58d64282
Fix `organization` field being `null` in `GET /api/v1/teams/{id}` (#24694) (#24696)

Backport #24694 by @yardenshoham

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 <git@yardenshoham.com>
Co-authored-by: Yarden Shoham <git@yardenshoham.com>
routers/api/v1/org/team.go