summaryrefslogtreecommitdiffstats
path: root/services/issue
diff options
context:
space:
mode:
authorJason Song <i@wolfogre.com>2023-01-08 09:34:58 +0800
committerGitHub <noreply@github.com>2023-01-08 09:34:58 +0800
commit6135359a049b9d9ab43c5901d4cdadfc45094aa1 (patch)
tree44ab2b9e7aada00010241141e5d039fe08c8af5f /services/issue
parentd42b52fcfa4b175810e8da6bc1a8822838ff6456 (diff)
downloadgitea-6135359a049b9d9ab43c5901d4cdadfc45094aa1.tar.gz
gitea-6135359a049b9d9ab43c5901d4cdadfc45094aa1.zip
Always reuse transaction (#22362)
Diffstat (limited to 'services/issue')
-rw-r--r--services/issue/comments.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/issue/comments.go b/services/issue/comments.go
index 46c0daf70a..1323fb47aa 100644
--- a/services/issue/comments.go
+++ b/services/issue/comments.go
@@ -123,7 +123,7 @@ func UpdateComment(ctx context.Context, c *issues_model.Comment, doer *user_mode
// DeleteComment deletes the comment
func DeleteComment(ctx context.Context, doer *user_model.User, comment *issues_model.Comment) error {
- err := db.AutoTx(ctx, func(ctx context.Context) error {
+ err := db.WithTx(ctx, func(ctx context.Context) error {
return issues_model.DeleteComment(ctx, comment)
})
if err != nil {