From 4d33ea050e4386e5021e429d6de78dad1b55be50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauris=20Buk=C5=A1is-Haberkorns?= Date: Tue, 12 Jun 2018 14:07:10 +0300 Subject: [PATCH] Delete reactions added to issues and comments when deleting repository --- models/repo.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/models/repo.go b/models/repo.go index c95c867f3..f4923cf4a 100644 --- a/models/repo.go +++ b/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 { return err } + if _, err = sess.In("issue_id", issueIDs).Delete(&Reaction{}); err != nil { + return err + } attachments := make([]*Attachment, 0, 5) if err = sess.