Use session for retrieving org teams (#11438) (#11439)

Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
pull/11451/head
guillep2k 5 years ago committed by GitHub
parent d78be7ddf9
commit 878434146f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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 {

Loading…
Cancel
Save