summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/issue_comment.go4
-rw-r--r--models/review.go4
2 files changed, 3 insertions, 5 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go
index c7e9e7cdfa..37d4d8c115 100644
--- a/models/issue_comment.go
+++ b/models/issue_comment.go
@@ -1016,10 +1016,6 @@ func fetchCodeCommentsByReview(e Engine, issue *Issue, currentUser *User, review
return nil, err
}
- if err := CommentList(comments).loadPosters(e); err != nil {
- return nil, err
- }
-
if err := issue.loadRepo(e); err != nil {
return nil, err
}
diff --git a/models/review.go b/models/review.go
index e1674e885d..0dc44a2a4c 100644
--- a/models/review.go
+++ b/models/review.go
@@ -62,7 +62,9 @@ type Review struct {
}
func (r *Review) loadCodeComments(e Engine) (err error) {
- r.CodeComments, err = fetchCodeCommentsByReview(e, r.Issue, nil, r)
+ if r.CodeComments == nil {
+ r.CodeComments, err = fetchCodeCommentsByReview(e, r.Issue, nil, r)
+ }
return
}