1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-31 22:58:35 +00:00

Fix panic when comment is nil (#34257) (#34277)

Fix #34254
Backport #34257
This commit is contained in:
Lunny Xiao
2025-04-24 18:28:02 -07:00
committed by GitHub
parent 030ed9462d
commit 4e5aca62ee
3 changed files with 10 additions and 22 deletions

View File

@@ -663,7 +663,7 @@ func AddReviewRequest(ctx context.Context, issue *Issue, reviewer, doer *user_mo
}
if review != nil {
// skip it when reviewer hase been request to review
// skip it when reviewer has been request to review
if review.Type == ReviewTypeRequest {
return nil, committer.Commit() // still commit the transaction, or committer.Close() will rollback it, even if it's a reused transaction.
}