0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-24 00:03:11 -05:00

Use session for retrieving org teams (#11438)

Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
This commit is contained in:
guillep2k 2020-05-16 16:29:29 -03:00 committed by GitHub
parent 4744e1e0f7
commit c3d9a5f846
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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