Skip to content

Commit a6f5efa

Browse files
ethantkoeniglunny
authored andcommitted
Fix ambiguity bug in getCommentsByRepoIDSince (#665)
1 parent 4a1f36c commit a6f5efa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

models/issue_comment.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,9 +420,11 @@ func getCommentsByIssueIDSince(e Engine, issueID, since int64) ([]*Comment, erro
420420

421421
func getCommentsByRepoIDSince(e Engine, repoID, since int64) ([]*Comment, error) {
422422
comments := make([]*Comment, 0, 10)
423-
sess := e.Where("issue.repo_id = ?", repoID).Join("INNER", "issue", "issue.id = comment.issue_id", repoID).Asc("created_unix")
423+
sess := e.Where("issue.repo_id = ?", repoID).
424+
Join("INNER", "issue", "issue.id = comment.issue_id").
425+
Asc("comment.created_unix")
424426
if since > 0 {
425-
sess.And("updated_unix >= ?", since)
427+
sess.And("comment.updated_unix >= ?", since)
426428
}
427429
return comments, sess.Find(&comments)
428430
}

0 commit comments

Comments
 (0)