summaryrefslogtreecommitdiffstats
path: root/modules/notification
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 /modules/notification
parentd42b52fcfa4b175810e8da6bc1a8822838ff6456 (diff)
downloadgitea-6135359a049b9d9ab43c5901d4cdadfc45094aa1.tar.gz
gitea-6135359a049b9d9ab43c5901d4cdadfc45094aa1.zip
Always reuse transaction (#22362)
Diffstat (limited to 'modules/notification')
-rw-r--r--modules/notification/ui/ui.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/notification/ui/ui.go b/modules/notification/ui/ui.go
index 63a3ffd199..bc66c3d5a3 100644
--- a/modules/notification/ui/ui.go
+++ b/modules/notification/ui/ui.go
@@ -243,7 +243,7 @@ func (ns *notificationService) NotifyPullReviewRequest(ctx context.Context, doer
}
func (ns *notificationService) NotifyRepoPendingTransfer(ctx context.Context, doer, newOwner *user_model.User, repo *repo_model.Repository) {
- err := db.AutoTx(ctx, func(ctx context.Context) error {
+ err := db.WithTx(ctx, func(ctx context.Context) error {
return activities_model.CreateRepoTransferNotification(ctx, doer, newOwner, repo)
})
if err != nil {