Fix bug of migraition v111 (#12738)
This commit is contained in:
parent
0cc4aadf58
commit
e8958bfc38
@ -380,10 +380,10 @@ func addBranchProtectionCanPushAndEnableWhitelist(x *xorm.Engine) error {
|
|||||||
}
|
}
|
||||||
totalPages := totalIssues / pageSize
|
totalPages := totalIssues / pageSize
|
||||||
|
|
||||||
// Find latest review of each user in each pull request, and set official field if appropriate
|
|
||||||
reviews := []*Review{}
|
|
||||||
|
|
||||||
var executeBody = func(page, pageSize int64) error {
|
var executeBody = func(page, pageSize int64) error {
|
||||||
|
// Find latest review of each user in each pull request, and set official field if appropriate
|
||||||
|
reviews := []*Review{}
|
||||||
|
|
||||||
if err := x.SQL("SELECT * FROM review WHERE id IN (SELECT max(id) as id FROM review WHERE issue_id > ? AND issue_id <= ? AND type in (?, ?) GROUP BY issue_id, reviewer_id)",
|
if err := x.SQL("SELECT * FROM review WHERE id IN (SELECT max(id) as id FROM review WHERE issue_id > ? AND issue_id <= ? AND type in (?, ?) GROUP BY issue_id, reviewer_id)",
|
||||||
page*pageSize, (page+1)*pageSize, ReviewTypeApprove, ReviewTypeReject).
|
page*pageSize, (page+1)*pageSize, ReviewTypeApprove, ReviewTypeReject).
|
||||||
Find(&reviews); err != nil {
|
Find(&reviews); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user