summaryrefslogtreecommitdiffstats
path: root/models/gpg_key.go
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2017-06-21 03:57:05 +0300
committerLunny Xiao <xiaolunwen@gmail.com>2017-06-21 08:57:05 +0800
commit6db387a21e245dc4aa7f009ca60574e42d934ffb (patch)
tree5f5dcd1b4cd3409e3fc1c4e2a0799ce85a09c3c0 /models/gpg_key.go
parent754482bf5d4922f0553c281ac525daff3f446c22 (diff)
downloadgitea-6db387a21e245dc4aa7f009ca60574e42d934ffb.tar.gz
gitea-6db387a21e245dc4aa7f009ca60574e42d934ffb.zip
Refactor session close as xorm already does everything needed internally (#2020)
Diffstat (limited to 'models/gpg_key.go')
-rw-r--r--models/gpg_key.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/gpg_key.go b/models/gpg_key.go
index 5763ef8403..d39cc54ce6 100644
--- a/models/gpg_key.go
+++ b/models/gpg_key.go
@@ -127,7 +127,7 @@ func AddGPGKey(ownerID int64, content string) (*GPGKey, error) {
//Get DB session
sess := x.NewSession()
- defer sessionRelease(sess)
+ defer sess.Close()
if err = sess.Begin(); err != nil {
return nil, err
}
@@ -267,7 +267,7 @@ func DeleteGPGKey(doer *User, id int64) (err error) {
}
sess := x.NewSession()
- defer sessionRelease(sess)
+ defer sess.Close()
if err = sess.Begin(); err != nil {
return err
}