diff options
author | Ethan Koenig <ethantkoenig@gmail.com> | 2017-12-19 21:37:56 -0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-12-19 23:37:56 -0600 |
commit | e67b4055f9087cc381df437502f3cd912abb53ed (patch) | |
tree | 23311b0a8de60b596da9d0d2c67f2eec017453c4 /models/repo.go | |
parent | 7cf17e376ba06e246fb3143e94f3f4b8af259ae4 (diff) | |
download | gitea-e67b4055f9087cc381df437502f3cd912abb53ed.tar.gz gitea-e67b4055f9087cc381df437502f3cd912abb53ed.zip |
Fix repo-transfer-and-team-repo-count bug (#3241)
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/models/repo.go b/models/repo.go index ff0d00308f..40495e4399 100644 --- a/models/repo.go +++ b/models/repo.go @@ -1503,20 +1503,6 @@ func TransferOwnership(doer *User, newOwnerName string, repo *Repository) error // Remove old team-repository relations. if owner.IsOrganization() { - if err = owner.getTeams(sess); err != nil { - return fmt.Errorf("getTeams: %v", err) - } - for _, t := range owner.Teams { - if !t.hasRepository(sess, repo.ID) { - continue - } - - t.NumRepos-- - if _, err := sess.ID(t.ID).Cols("num_repos").Update(t); err != nil { - return fmt.Errorf("decrease team repository count '%d': %v", t.ID, err) - } - } - if err = owner.removeOrgRepo(sess, repo.ID); err != nil { return fmt.Errorf("removeOrgRepo: %v", err) } |