]> source.dussan.org Git - gitea.git/commitdiff
Use session for retrieving org teams (#11438)
authorguillep2k <18600385+guillep2k@users.noreply.github.com>
Sat, 16 May 2020 19:29:29 +0000 (16:29 -0300)
committerGitHub <noreply@github.com>
Sat, 16 May 2020 19:29:29 +0000 (20:29 +0100)
Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
models/repo.go

index 438066e0da3193f4c54ae6d3bb9c6648243366d2..875c9ad1c3dada78d3b2a47b895a19cfab693315 100644 (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 {