forked from kevadesu/forgejo
Backport #27903 by @lng2020 Fix #27767 Add a test to ensure its behavior Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
This commit is contained in:
parent
28e3d0b0d3
commit
61d3d9205b
2 changed files with 40 additions and 0 deletions
|
@ -898,6 +898,16 @@ func DeleteReview(ctx context.Context, r *Review) error {
|
|||
return err
|
||||
}
|
||||
|
||||
opts = FindCommentsOptions{
|
||||
Type: CommentTypeDismissReview,
|
||||
IssueID: r.IssueID,
|
||||
ReviewID: r.ID,
|
||||
}
|
||||
|
||||
if _, err := sess.Where(opts.ToConds()).Delete(new(Comment)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if _, err := sess.ID(r.ID).Delete(new(Review)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue