Delete reactions added to issues and comments when deleting repository (#4232) (#4237)

This commit is contained in:
Lauris BH 2018-06-13 02:19:30 +03:00 committed by techknowlogick
parent f10640433f
commit c746f820ab

View File

@ -1846,6 +1846,9 @@ func DeleteRepository(doer *User, uid, repoID int64) error {
if _, err = sess.In("issue_id", issueIDs).Delete(&IssueUser{}); err != nil {
return err
}
if _, err = sess.In("issue_id", issueIDs).Delete(&Reaction{}); err != nil {
return err
}
attachments := make([]*Attachment, 0, 5)
if err = sess.