Commit a6f5efa0 authored by Ethan Koenig's avatar Ethan Koenig Committed by Lunny Xiao
Browse files

Fix ambiguity bug in getCommentsByRepoIDSince (#665)

parent 4a1f36c3
Showing with 4 additions and 2 deletions
+4 -2
......@@ -420,9 +420,11 @@ func getCommentsByIssueIDSince(e Engine, issueID, since int64) ([]*Comment, erro
func getCommentsByRepoIDSince(e Engine, repoID, since int64) ([]*Comment, error) {
comments := make([]*Comment, 0, 10)
sess := e.Where("issue.repo_id = ?", repoID).Join("INNER", "issue", "issue.id = comment.issue_id", repoID).Asc("created_unix")
sess := e.Where("issue.repo_id = ?", repoID).
Join("INNER", "issue", "issue.id = comment.issue_id").
Asc("comment.created_unix")
if since > 0 {
sess.And("updated_unix >= ?", since)
sess.And("comment.updated_unix >= ?", since)
}
return comments, sess.Find(&comments)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment