aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/pull.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/pull.go')
-rw-r--r--routers/web/repo/pull.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go
index e6fb492d6e..0c82736eef 100644
--- a/routers/web/repo/pull.go
+++ b/routers/web/repo/pull.go
@@ -784,18 +784,18 @@ func viewPullFiles(ctx *context.Context, specifiedStartCommit, specifiedEndCommi
return
}
+ allComments := issues_model.CommentList{}
for _, file := range diff.Files {
for _, section := range file.Sections {
for _, line := range section.Lines {
- for _, comment := range line.Comments {
- if err := comment.LoadAttachments(ctx); err != nil {
- ctx.ServerError("LoadAttachments", err)
- return
- }
- }
+ allComments = append(allComments, line.Comments...)
}
}
}
+ if err := allComments.LoadAttachments(ctx); err != nil {
+ ctx.ServerError("LoadAttachments", err)
+ return
+ }
pb, err := git_model.GetFirstMatchProtectedBranchRule(ctx, pull.BaseRepoID, pull.BaseBranch)
if err != nil {