summaryrefslogtreecommitdiffstats
path: root/models/repo
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 /models/repo
parentd42b52fcfa4b175810e8da6bc1a8822838ff6456 (diff)
downloadgitea-6135359a049b9d9ab43c5901d4cdadfc45094aa1.tar.gz
gitea-6135359a049b9d9ab43c5901d4cdadfc45094aa1.zip
Always reuse transaction (#22362)
Diffstat (limited to 'models/repo')
-rw-r--r--models/repo/collaboration.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/repo/collaboration.go b/models/repo/collaboration.go
index 29bcab70f3..7989e5bdf9 100644
--- a/models/repo/collaboration.go
+++ b/models/repo/collaboration.go
@@ -105,7 +105,7 @@ func ChangeCollaborationAccessMode(ctx context.Context, repo *Repository, uid in
return nil
}
- return db.AutoTx(ctx, func(ctx context.Context) error {
+ return db.WithTx(ctx, func(ctx context.Context) error {
e := db.GetEngine(ctx)
collaboration := &Collaboration{