Update TaxonomyService.cs (#8223)

This commit is contained in:
Chaleomkiat Munkong
2019-06-21 02:12:15 +07:00
committed by Sébastien Ros
parent bf1945d3a9
commit 46f76d7140

View File

@@ -115,9 +115,9 @@ namespace Orchard.Taxonomies.Services {
public void DeleteTaxonomy(TaxonomyPart taxonomy) {
_contentManager.Remove(taxonomy.ContentItem);
List<TermPart> allTerms = GetRootTerms(taxonomy.Id).ToList();
// Removing terms
foreach (var term in GetRootTerms(taxonomy.Id)) {
foreach (var term in allTerms) {
DeleteTerm(term);
}