From a93f13849cd7f54029f1dc17b642d024b98ee71e Mon Sep 17 00:00:00 2001 From: David Schneiderbauer Date: Tue, 19 Jun 2018 21:44:33 +0200 Subject: Fix not removed watches on unallowed repositories (#4201) --- models/repo.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'models/repo.go') diff --git a/models/repo.go b/models/repo.go index f4923cf4a9..7f2be502a4 100644 --- a/models/repo.go +++ b/models/repo.go @@ -1851,6 +1851,9 @@ func DeleteRepository(doer *User, uid, repoID int64) error { if _, err = sess.In("issue_id", issueIDs).Delete(&Reaction{}); err != nil { return err } + if _, err = sess.In("issue_id", issueIDs).Delete(&IssueWatch{}); err != nil { + return err + } attachments := make([]*Attachment, 0, 5) if err = sess. -- cgit v1.2.3