1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-03 09:07:19 +00:00

Fix panic when comment is nil (#34257)

Fix #34254
This commit is contained in:
Lunny Xiao
2025-04-23 18:58:00 -07:00
committed by GitHub
parent e625250ffc
commit e73c1139ac
3 changed files with 10 additions and 22 deletions

View File

@ -664,7 +664,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.
}