mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Ensure review dismissal only dismisses the correct review (#15477)
Fix #15472 Signed-off-by: Andrew Thornton art27@cantab.net
This commit is contained in:
parent
61bae620c1
commit
9d07facdeb
2 changed files with 58 additions and 8 deletions
|
@ -566,7 +566,11 @@ func DismissReview(review *Review, isDismiss bool) (err error) {
|
|||
|
||||
review.Dismissed = isDismiss
|
||||
|
||||
_, err = x.Cols("dismissed").Update(review)
|
||||
if review.ID == 0 {
|
||||
return ErrReviewNotExist{}
|
||||
}
|
||||
|
||||
_, err = x.ID(review.ID).Cols("dismissed").Update(review)
|
||||
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue