]> source.dussan.org Git - gitea.git/commitdiff
Load attachments for code comments (#30124) (#30126)
authoryp05327 <576951401@qq.com>
Wed, 27 Mar 2024 08:06:23 +0000 (17:06 +0900)
committerGitHub <noreply@github.com>
Wed, 27 Mar 2024 08:06:23 +0000 (16:06 +0800)
backport #30124

models/issues/comment_code.go

index 27f669413497631e847fe58c9e1aeeb9fdba1810..e50ce1e07ccb7ee7bdeb2e7f9f7228b66324939e 100644 (file)
@@ -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))