diff options
author | Jason Song <i@wolfogre.com> | 2023-01-08 09:34:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-08 09:34:58 +0800 |
commit | 6135359a049b9d9ab43c5901d4cdadfc45094aa1 (patch) | |
tree | 44ab2b9e7aada00010241141e5d039fe08c8af5f /models/repo | |
parent | d42b52fcfa4b175810e8da6bc1a8822838ff6456 (diff) | |
download | gitea-6135359a049b9d9ab43c5901d4cdadfc45094aa1.tar.gz gitea-6135359a049b9d9ab43c5901d4cdadfc45094aa1.zip |
Always reuse transaction (#22362)
Diffstat (limited to 'models/repo')
-rw-r--r-- | models/repo/collaboration.go | 2 |
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{ |