aboutsummaryrefslogtreecommitdiffstats
path: root/models/issues
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2024-03-27 13:44:26 +0900
committerGitHub <noreply@github.com>2024-03-27 04:44:26 +0000
commitce3c3512265df3b4940672be40065c4fb415ef95 (patch)
tree2089badfae726cfb6dd72eb8a738c6d7166aa7fa /models/issues
parenta9e5706696f7d593e281d33783877b7772e48e19 (diff)
downloadgitea-ce3c3512265df3b4940672be40065c4fb415ef95.tar.gz
gitea-ce3c3512265df3b4940672be40065c4fb415ef95.zip
Load attachments for code comments (#30124)
Fix #30103 ps: comments has `LoadAttributes`, but maybe considering performance problem, we don't call it.
Diffstat (limited to 'models/issues')
-rw-r--r--models/issues/comment_code.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/models/issues/comment_code.go b/models/issues/comment_code.go
index 74a7a86f26..f860dacfac 100644
--- a/models/issues/comment_code.go
+++ b/models/issues/comment_code.go
@@ -74,6 +74,10 @@ func findCodeComments(ctx context.Context, opts FindCommentsOptions, issue *Issu
return nil, err
}
+ if err := comments.LoadAttachments(ctx); err != nil {
+ return nil, err
+ }
+
// Find all reviews by ReviewID
reviews := make(map[int64]*Review)
ids := make([]int64, 0, len(comments))