Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions models/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -2124,6 +2124,7 @@ func deleteIssue(ctx context.Context, issue *Issue) error {
&IssueDependency{},
&IssueAssignees{},
&IssueUser{},
&Notification{},
&Reaction{},
&IssueWatch{},
&Stopwatch{},
Expand Down
2 changes: 1 addition & 1 deletion models/issue_comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ func deleteComment(e db.Engine, comment *Comment) error {
}

if comment.Type == CommentTypeComment {
if _, err := e.Exec("UPDATE `issue` SET num_comments = num_comments - 1 WHERE id = ?", comment.IssueID); err != nil {
if _, err := e.ID(comment.IssueID).Decr("num_comments").Update(new(Issue)); err != nil {
return err
}
}
Expand Down