Skip to content

Commit 2b8c0bb

Browse files
lafrikstechknowlogick
authored andcommitted
Delete reactions added to issues and comments when deleting repository (#4232)
1 parent 406031d commit 2b8c0bb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

models/repo.go

+3
Original file line numberDiff line numberDiff line change
@@ -1848,6 +1848,9 @@ func DeleteRepository(doer *User, uid, repoID int64) error {
18481848
if _, err = sess.In("issue_id", issueIDs).Delete(&IssueUser{}); err != nil {
18491849
return err
18501850
}
1851+
if _, err = sess.In("issue_id", issueIDs).Delete(&Reaction{}); err != nil {
1852+
return err
1853+
}
18511854

18521855
attachments := make([]*Attachment, 0, 5)
18531856
if err = sess.

0 commit comments

Comments
 (0)