Skip to content

Commit 0ffa30f

Browse files
committed
use the Engine that was passed into the method
1 parent eadbbbe commit 0ffa30f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

models/issue_comment.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,18 +1108,18 @@ func findCodeComments(e Engine, opts FindCommentsOptions, issue *Issue, currentU
11081108
if review.ID == 0 {
11091109
conds = conds.And(builder.Eq{"invalidated": false})
11101110
}
1111-
if err := x.Where(conds).
1111+
if err := e.Where(conds).
11121112
Asc("comment.created_unix").
11131113
Asc("comment.id").
11141114
Find(&comments); err != nil {
11151115
return nil, err
11161116
}
11171117

1118-
if err := issue.loadRepo(x); err != nil {
1118+
if err := issue.loadRepo(e); err != nil {
11191119
return nil, err
11201120
}
11211121

1122-
if err := CommentList(comments).loadPosters(x); err != nil {
1122+
if err := CommentList(comments).loadPosters(e); err != nil {
11231123
return nil, err
11241124
}
11251125

@@ -1131,7 +1131,7 @@ func findCodeComments(e Engine, opts FindCommentsOptions, issue *Issue, currentU
11311131
ids = append(ids, comment.ReviewID)
11321132
}
11331133
}
1134-
if err := x.In("id", ids).Find(&reviews); err != nil {
1134+
if err := e.In("id", ids).Find(&reviews); err != nil {
11351135
return nil, err
11361136
}
11371137

0 commit comments

Comments
 (0)