diff options
author | 6543 <6543@obermui.de> | 2024-02-13 09:45:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-13 09:45:31 +0100 |
commit | 6fad2c874438275d3f69bb1cc223708bd2d27ff6 (patch) | |
tree | 722394cc6743f85d65da2be4e9642061e077e9e3 /models/issues/comment_list.go | |
parent | b85e4a64fa26e1f20321c3a7cedf9fa05640ca48 (diff) | |
download | gitea-6fad2c874438275d3f69bb1cc223708bd2d27ff6.tar.gz gitea-6fad2c874438275d3f69bb1cc223708bd2d27ff6.zip |
Dont load Review if Comment is CommentTypeReviewRequest (#28551)
RequestReview get deleted on review.
So we don't have to try to load them on comments.
broken out #28544
Diffstat (limited to 'models/issues/comment_list.go')
-rw-r--r-- | models/issues/comment_list.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/models/issues/comment_list.go b/models/issues/comment_list.go index 93af45870e..cb7df3270d 100644 --- a/models/issues/comment_list.go +++ b/models/issues/comment_list.go @@ -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 |