Browse Source

Use session for retrieving org teams (#11438)

Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
for-closed-social
guillep2k 4 years ago
committed by GitHub
parent
commit
c3d9a5f846
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      models/repo.go

+ 1
- 1
models/repo.go View File

@ -1241,7 +1241,7 @@ func TransferOwnership(doer *User, newOwnerName string, repo *Repository) error
}
if newOwner.IsOrganization() {
if err := newOwner.GetTeams(&SearchTeamOptions{}); err != nil {
if err := newOwner.getTeams(sess); err != nil {
return fmt.Errorf("GetTeams: %v", err)
}
for _, t := range newOwner.Teams {

Loading…
Cancel
Save