Fix unwanted team review request deletion (#17257)
Add missing issue_id = ? to where clause Fixes #17251
This commit is contained in:
parent
46cac263ca
commit
25a2000787
1 changed files with 1 additions and 1 deletions
|
@ -444,7 +444,7 @@ func SubmitReview(doer *User, issue *Issue, reviewType ReviewType, content, comm
|
||||||
// try to remove team review request if need
|
// try to remove team review request if need
|
||||||
if issue.Repo.Owner.IsOrganization() && (reviewType == ReviewTypeApprove || reviewType == ReviewTypeReject) {
|
if issue.Repo.Owner.IsOrganization() && (reviewType == ReviewTypeApprove || reviewType == ReviewTypeReject) {
|
||||||
teamReviewRequests := make([]*Review, 0, 10)
|
teamReviewRequests := make([]*Review, 0, 10)
|
||||||
if err := sess.SQL("SELECT * FROM review WHERE reviewer_team_id > 0 AND type = ?", ReviewTypeRequest).Find(&teamReviewRequests); err != nil {
|
if err := sess.SQL("SELECT * FROM review WHERE issue_id = ? AND reviewer_team_id > 0 AND type = ?", issue.ID, ReviewTypeRequest).Find(&teamReviewRequests); err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue