From 878434146fa460f215a6dce34502e162a33ee148 Mon Sep 17 00:00:00 2001 From: guillep2k <18600385+guillep2k@users.noreply.github.com> Date: Sat, 16 May 2020 18:10:04 -0300 Subject: [PATCH] Use session for retrieving org teams (#11438) (#11439) 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 b5a9395ed..cb092f325 100644 --- a/models/repo.go +++ b/models/repo.go @@ -1608,7 +1608,7 @@ func TransferOwnership(doer *User, newOwnerName string, repo *Repository) error } if newOwner.IsOrganization() { - if err := newOwner.GetTeams(); err != nil { + if err := newOwner.getTeams(sess); err != nil { return fmt.Errorf("GetTeams: %v", err) } for _, t := range newOwner.Teams {