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

tokarchuk/v1.17
Lauris BH 7 years ago committed by techknowlogick
parent 406031d3cc
commit 2b8c0bb5e2
  1. 3
      models/repo.go

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

Loading…
Cancel
Save