1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-03 09:07:19 +00:00

Fix team edit API panic (#6785)

* fix team edit API panic

* Change user to a member of the owner team
This commit is contained in:
ngourdon
2019-04-28 15:52:38 +02:00
committed by techknowlogick
parent 21fb791747
commit 7284829962
2 changed files with 65 additions and 1 deletions

View File

@ -189,7 +189,7 @@ func EditTeam(ctx *context.APIContext, form api.EditTeamOption) {
var units = make([]*models.TeamUnit, 0, len(form.Units))
for _, tp := range unitTypes {
units = append(units, &models.TeamUnit{
OrgID: ctx.Org.Organization.ID,
OrgID: ctx.Org.Team.OrgID,
Type: tp,
})
}