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_transfer.go | |
parent | d42b52fcfa4b175810e8da6bc1a8822838ff6456 (diff) | |
download | gitea-6135359a049b9d9ab43c5901d4cdadfc45094aa1.tar.gz gitea-6135359a049b9d9ab43c5901d4cdadfc45094aa1.zip |
Always reuse transaction (#22362)
Diffstat (limited to 'models/repo_transfer.go')
-rw-r--r-- | models/repo_transfer.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/repo_transfer.go b/models/repo_transfer.go index 19e6c06627..27a77f9b8c 100644 --- a/models/repo_transfer.go +++ b/models/repo_transfer.go @@ -155,7 +155,7 @@ func TestRepositoryReadyForTransfer(status repo_model.RepositoryStatus) error { // CreatePendingRepositoryTransfer transfer a repo from one owner to a new one. // it marks the repository transfer as "pending" func CreatePendingRepositoryTransfer(ctx context.Context, doer, newOwner *user_model.User, repoID int64, teams []*organization.Team) error { - return db.AutoTx(ctx, func(ctx context.Context) error { + return db.WithTx(ctx, func(ctx context.Context) error { repo, err := repo_model.GetRepositoryByID(ctx, repoID) if err != nil { return err |