mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
Use session for retrieving org teams (#11438)
Co-authored-by: Guillermo Prandi <[email protected]>
This commit is contained in:
co-authored by
Guillermo Prandi
parent
4744e1e0f7
commit
c3d9a5f846
+1
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user