Merge pull request #4194 from ijaz-saeed/dev

Format Exception in int.Parse(route.ModuleId)
This commit is contained in:
Shaun Walker
2024-04-26 13:26:02 -04:00
committed by GitHub
3 changed files with 7 additions and 4 deletions

View File

@ -1,5 +1,6 @@
@namespace Oqtane.Modules.Admin.Pages
@using Oqtane.Interfaces
@using System.Globalization
@inherits ModuleBase
@inject NavigationManager NavigationManager
@inject IPageService PageService
@ -362,7 +363,7 @@
_parent = PageState.Pages.FirstOrDefault(item => item.PageId == _page.ParentId);
}
_children = new List<Page>();
foreach (Page p in PageState.Pages.Where(item => (_parentid == "-1" && item.ParentId == null) || (item.ParentId == int.Parse(_parentid))))
foreach (Page p in PageState.Pages.Where(item => (_parentid == "-1" && item.ParentId == null) || (item.ParentId == int.Parse(_parentid, CultureInfo.InvariantCulture))))
{
if (p.PageId != _pageId && UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, p.PermissionList))
{