mirror of
https://github.com/go-gitea/gitea.git
synced 2025-10-09 10:16:31 +00:00
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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user