修改BUG:菜单维护页面父级菜单查询条件有值时程序抛出异常 closed #ISBP5

This commit is contained in:
Argo Zhang 2019-03-06 01:08:45 +08:00
parent 7ddd94c162
commit 25e77b607f
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
using Bootstrap.DataAccess; using Bootstrap.DataAccess;
using Longbow.Web.Mvc; using Longbow.Web.Mvc;
using System.Linq; using System.Linq;
@ -35,7 +35,7 @@ namespace Bootstrap.Admin.Query
var data = MenuHelper.RetrieveMenusByUserName(userName); var data = MenuHelper.RetrieveMenusByUserName(userName);
if (!string.IsNullOrEmpty(ParentName)) if (!string.IsNullOrEmpty(ParentName))
{ {
data = data.Where(t => t.ParentName.Contains(ParentName)); data = data.Where(t => t.ParentName != null && t.ParentName.Contains(ParentName));
} }
if (!string.IsNullOrEmpty(Name)) if (!string.IsNullOrEmpty(Name))
{ {