index
:
gogs.git
Gogs is a painless self-hosted Git service
log msg
author
committer
range
buildscript
main
mygogs
about
summary
refs
log
tree
commit
diff
path:
root
/
models
/
comment.go
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
unified
ssdiff
stat only
author
Unknwon <u@gogs.io>
2017-06-11 03:06:36 -0400
committer
Unknwon <u@gogs.io>
2017-06-11 03:06:36 -0400
commit
0e6a6bf880f950dfc46545b4172bfa980dd6d505
(
patch
)
tree
9e21dee1da616324676f224d37ca740e2f8f1e55
/
models/comment.go
parent
e1f01305d8fcd93504db4fecbbbcbec0c8f7e970
(
diff
)
Refactoring: remove sessionRelease()
XORM supports automatic roll back in session Close() already.
Diffstat
(limited to 'models/comment.go')
-rw-r--r--
models/comment.go
4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/comment.go b/models/comment.go
index be29e2ba..0f5b635a 100644
--- a/
models/comment.go
+++ b/
models/comment.go
@@ -323,7 +323,7 @@ type CreateCommentOptions struct {
// CreateComment creates comment of issue or commit.
func CreateComment(opts *CreateCommentOptions) (comment *Comment, err error) {
sess := x.NewSession()
- defer sessionRelease(sess)
+ defer sess.Close()
if err = sess.Begin(); err != nil {
return nil, err
}
@@ -497,7 +497,7 @@ func DeleteCommentByID(doer *User, id int64) error {
}
sess := x.NewSession()
- defer sessionRelease(sess)
+ defer sess.Close()
if err = sess.Begin(); err != nil {
return err
}