summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguillep2k <18600385+guillep2k@users.noreply.github.com>2020-05-16 16:29:29 -0300
committerGitHub <noreply@github.com>2020-05-16 20:29:29 +0100
commitc3d9a5f8464e0921fc4063d903ecf2063fa152fa (patch)
tree52b7db06c17292ba72c36fb84766d6ec93315780
parent4744e1e0f7df90efd3f192851524eeb838d7229b (diff)
downloadgitea-c3d9a5f8464e0921fc4063d903ecf2063fa152fa.tar.gz
gitea-c3d9a5f8464e0921fc4063d903ecf2063fa152fa.zip
Use session for retrieving org teams (#11438)
Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
-rw-r--r--models/repo.go2
1 files changed, 1 insertions, 1 deletions
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 {