diff options
author | Unknwon <u@gogs.io> | 2017-06-27 20:21:36 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-06-27 20:21:36 -0400 |
commit | 8ed2330d6e9be743b208bca4cd5a25269318040a (patch) | |
tree | e2126e5ab9e92894cdb1d627167f25193679fd93 /models/comment.go | |
parent | 261237745f3786dc1ca0aea85dde101bd2870be3 (diff) |
issue_comment: fix pg syntax ambiguous (#4586)
Also handle error related to time parsing.
Diffstat (limited to 'models/comment.go')
-rw-r--r-- | models/comment.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/comment.go b/models/comment.go index b841c17d..b31b4a84 100644 --- a/models/comment.go +++ b/models/comment.go @@ -437,9 +437,9 @@ 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", repoID).Asc("comment.created_unix") if since > 0 { - sess.And("updated_unix >= ?", since) + sess.And("comment.updated_unix >= ?", since) } if err := sess.Find(&comments); err != nil { return nil, err |