diff --git a/models/repo.go b/models/repo.go index b5a9395ed..cb092f325 100644 --- a/models/repo.go +++ b/models/repo.go @@ -1608,7 +1608,7 @@ func TransferOwnership(doer *User, newOwnerName string, repo *Repository) error } if newOwner.IsOrganization() { - if err := newOwner.GetTeams(); err != nil { + if err := newOwner.getTeams(sess); err != nil { return fmt.Errorf("GetTeams: %v", err) } for _, t := range newOwner.Teams {