From cd15a1797076d97261c1fd9e9ebf50fd4bb76a4c Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 23 Feb 2017 18:42:03 -0500 Subject: [PATCH] models/repo: delete protect branch options when delete repository --- models/repo.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/models/repo.go b/models/repo.go index 0d93e0bb4..76cd82334 100644 --- a/models/repo.go +++ b/models/repo.go @@ -1401,6 +1401,8 @@ func DeleteRepository(uid, repoID int64) error { &Release{RepoID: repoID}, &Collaboration{RepoID: repoID}, &PullRequest{BaseRepoID: repoID}, + &ProtectBranch{RepoID: repoID}, + &ProtectBranchWhitelist{RepoID: repoID}, ); err != nil { return fmt.Errorf("deleteBeans: %v", err) }