From c746f820abb670636abab5cc79f9635a661fe43c Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Wed, 13 Jun 2018 02:19:30 +0300 Subject: [PATCH] Delete reactions added to issues and comments when deleting repository (#4232) (#4237) --- models/repo.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/models/repo.go b/models/repo.go index 1142c590b..36bbc7db5 100644 --- a/models/repo.go +++ b/models/repo.go @@ -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.