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) }