forked from forgejo/forgejo
Backport #28551 RequestReview get deleted on review. So we don't have to try to load them on comments. (cherry picked from commit 0ac3186267b717bce7076ef44f883df7720d7a2d)
This commit is contained in:
parent
60a4c05d23
commit
d3846df1f9
3 changed files with 12 additions and 1 deletions
|
@ -430,7 +430,8 @@ func (comments CommentList) loadReviews(ctx context.Context) error {
|
|||
for _, comment := range comments {
|
||||
comment.Review = reviews[comment.ReviewID]
|
||||
if comment.Review == nil {
|
||||
if comment.ReviewID > 0 {
|
||||
// review request which has been replaced by actual reviews doesn't exist in database anymore, so don't log errors for them.
|
||||
if comment.ReviewID > 0 && comment.Type != CommentTypeReviewRequest {
|
||||
log.Error("comment with review id [%d] but has no review record", comment.ReviewID)
|
||||
}
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue