From c55c8bff6e1a40ee355f4f38079d594451d1947c Mon Sep 17 00:00:00 2001 From: sbwalker Date: Wed, 28 Jun 2023 13:05:34 -0400 Subject: [PATCH] fix #2941 - HasChildren property not considering deleted pages --- Oqtane.Server/Controllers/SiteController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Oqtane.Server/Controllers/SiteController.cs b/Oqtane.Server/Controllers/SiteController.cs index 95de3a928..99a64b32e 100644 --- a/Oqtane.Server/Controllers/SiteController.cs +++ b/Oqtane.Server/Controllers/SiteController.cs @@ -246,7 +246,7 @@ private static List GetPagesHierarchy(List pages) foreach (Page child in children) { child.Level = level + 1; - child.HasChildren = pages.Any(item => item.ParentId == child.PageId); + child.HasChildren = pages.Any(item => item.ParentId == child.PageId && !item.IsDeleted); hierarchy.Add(child); getPath(pageList, child); }