1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-04 14:46:57 -05:00

Fix bug in removeOrgRepo (#1858)

This commit is contained in:
Ethan Koenig 2017-06-02 21:06:10 -04:00 committed by Bo-Yi Wu
parent 62f600cf1c
commit 036ce3f813

View File

@ -549,7 +549,7 @@ func removeOrgRepo(e Engine, orgID, repoID int64) error {
teamIDs := make([]int64, len(teamRepos)) teamIDs := make([]int64, len(teamRepos))
for i, teamRepo := range teamRepos { for i, teamRepo := range teamRepos {
teamIDs[i] = teamRepo.ID teamIDs[i] = teamRepo.TeamID
} }
_, err := e.Decr("num_repos").In("id", teamIDs).Update(new(Team)) _, err := e.Decr("num_repos").In("id", teamIDs).Update(new(Team))