From a1cec4141e9b82fbee4e3cbf3d92af749df235ab Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 28 Aug 2023 12:20:31 +0800 Subject: [PATCH] Fix bug for ctx usage (#26763) Fix #26684 Backport #26762 --- services/pull/review.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/pull/review.go b/services/pull/review.go index 6b8373c0899..57d63d6ec9d 100644 --- a/services/pull/review.go +++ b/services/pull/review.go @@ -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 }