mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 11:52:10 +00:00
Always reuse transaction (#22362)
This commit is contained in:
parent
d42b52fcfa
commit
6135359a04
11 changed files with 104 additions and 42 deletions
|
@ -14,7 +14,7 @@ import (
|
|||
)
|
||||
|
||||
func AddCollaborator(ctx context.Context, repo *repo_model.Repository, u *user_model.User) error {
|
||||
return db.AutoTx(ctx, func(ctx context.Context) error {
|
||||
return db.WithTx(ctx, func(ctx context.Context) error {
|
||||
collaboration := &repo_model.Collaboration{
|
||||
RepoID: repo.ID,
|
||||
UserID: u.ID,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue