1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-30 09:41:11 -05:00

Fix bug for ctx usage (#26763)

Fix #26684 
Backport #26762
This commit is contained in:
Lunny Xiao 2023-08-28 12:20:31 +08:00 committed by GitHub
parent 307ee2c044
commit a1cec4141e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -334,9 +334,9 @@ func DismissApprovalReviews(ctx context.Context, doer *user_model.User, pull *is
return err
}
return db.WithTx(ctx, func(subCtx context.Context) error {
return db.WithTx(ctx, func(ctx context.Context) error {
for _, review := range reviews {
if err := issues_model.DismissReview(subCtx, review, true); err != nil {
if err := issues_model.DismissReview(ctx, review, true); err != nil {
return err
}