Skip to content

Commit 64399ae

Browse files
committed
deleteIssuesByRepoID: delete related CommentTypeRemoveDependency & CommentTypeAddDependency comments too
1 parent d257485 commit 64399ae

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

models/issue.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1978,6 +1978,11 @@ func deleteIssuesByRepoID(sess Engine, repoID int64) (attachmentPaths []string,
19781978
return
19791979
}
19801980

1981+
if _, err = sess.In("dependent_issue_id", deleteCond).
1982+
Delete(&Comment{}); err != nil {
1983+
return
1984+
}
1985+
19811986
var attachments []*Attachment
19821987
if err = sess.In("issue_id", deleteCond).
19831988
Find(&attachments); err != nil {

0 commit comments

Comments
 (0)