mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
Fix misuse of TxContext
(#30061)
Help #29999, or its tests cannot pass. Also, add some comments to clarify the usage of `TxContext`. I don't check all usages of `TxContext` because there are too many (almost 140+). It's a better idea to replace them with `WithTx` instead of checking them one by one. However, that may be another refactoring PR.
This commit is contained in:
@ -620,7 +620,7 @@ func AddReviewRequest(ctx context.Context, issue *Issue, reviewer, doer *user_mo
|
||||
|
||||
// skip it when reviewer hase been request to review
|
||||
if review != nil && review.Type == ReviewTypeRequest {
|
||||
return nil, nil
|
||||
return nil, committer.Commit() // still commit the transaction, or committer.Close() will rollback it, even if it's a reused transaction.
|
||||
}
|
||||
|
||||
// if the reviewer is an official reviewer,
|
||||
|
Reference in New Issue
Block a user