From 953914d1f7b06112c6efd34176b06b4a3849db00 Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Wed, 27 Mar 2024 17:06:23 +0900 Subject: [PATCH] Load attachments for code comments (#30124) (#30126) backport #30124 (cherry picked from commit 7bffb923ce723947837fd1c12fe2f1edcba72315) --- models/issues/comment_code.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/models/issues/comment_code.go b/models/issues/comment_code.go index 0e6340c189..0b96f93ee0 100644 --- a/models/issues/comment_code.go +++ b/models/issues/comment_code.go @@ -117,6 +117,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))