Skip to content

Commit c746f82

Browse files
lafrikstechknowlogick
authored andcommitted
Delete reactions added to issues and comments when deleting repository (#4232) (#4237)
1 parent f106404 commit c746f82

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

models/repo.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,6 +1846,9 @@ func DeleteRepository(doer *User, uid, repoID int64) error {
18461846
if _, err = sess.In("issue_id", issueIDs).Delete(&IssueUser{}); err != nil {
18471847
return err
18481848
}
1849+
if _, err = sess.In("issue_id", issueIDs).Delete(&Reaction{}); err != nil {
1850+
return err
1851+
}
18491852

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

0 commit comments

Comments
 (0)