Always reuse transaction (#22362)

This commit is contained in:
Jason Song
2023-01-08 09:34:58 +08:00
committed by GitHub
parent d42b52fcfa
commit 6135359a04
11 changed files with 104 additions and 42 deletions

View File

@ -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{