fix GetLatestCommitStatuses

This commit is contained in:
Lunny Xiao 2017-09-17 20:32:00 +08:00
parent 21b57b6bc5
commit cd11672fd1
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A

View File

@ -181,7 +181,7 @@ func GetLatestCommitStatuses(repoIDs []int64, shas []string) ([][]*CommitStatus,
err := x.Table(&CommitStatus{}).
Where(cond).
Select("max( id ) as id, repo_id").
GroupBy("context").OrderBy("max( id ) desc").Find(&results)
GroupBy("repo_id, sha, context").OrderBy("max( id ) desc").Find(&results)
if err != nil {
return nil, err
}