1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00

Merge pull request #2894 from tboerger/feature/join-condition

Followup fix for previous query fix
This commit is contained in:
Unknwon 2016-03-27 18:07:52 -04:00
commit 78481f0e42

View File

@ -552,10 +552,10 @@ func Issues(opts *IssuesOptions) ([]*Issue, error) {
}
if opts.IsMention {
sess.Join("INNER", "issue_user", "issue.id = issue_user.issue_id AND issue_user.is_mentioned = 1")
sess.Join("INNER", "issue_user", "issue.id = issue_user.issue_id").And("issue_user.is_mentioned = ?", true)
if opts.UserID > 0 {
sess.Where("issue_user.uid = ?", opts.UserID)
sess.And("issue_user.uid = ?", opts.UserID)
}
}