From c3d9a5f8464e0921fc4063d903ecf2063fa152fa Mon Sep 17 00:00:00 2001 From: guillep2k <18600385+guillep2k@users.noreply.github.com> Date: Sat, 16 May 2020 16:29:29 -0300 Subject: [PATCH] Use session for retrieving org teams (#11438) Co-authored-by: Guillermo Prandi --- models/repo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/repo.go b/models/repo.go index 438066e0da..875c9ad1c3 100644 --- a/models/repo.go +++ b/models/repo.go @@ -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 {