summaryrefslogtreecommitdiffstats
path: root/models/repo_permission.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/repo_permission.go')
-rw-r--r--models/repo_permission.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/models/repo_permission.go b/models/repo_permission.go
index 3db7200470..a6304cf1aa 100644
--- a/models/repo_permission.go
+++ b/models/repo_permission.go
@@ -279,8 +279,7 @@ func IsUserRealRepoAdmin(repo *Repository, user *User) (bool, error) {
return true, nil
}
- sess := db.NewSession(db.DefaultContext)
- defer sess.Close()
+ sess := db.GetEngine(db.DefaultContext)
if err := repo.getOwner(sess); err != nil {
return false, err