Don't attempt to apply a filter if none is submitted
This commit is contained in:
committed by
Sebastiaan Janssen
parent
17d818b604
commit
2dfbb1d555
@@ -479,7 +479,9 @@ namespace Umbraco.Web.Editors
|
||||
if (objectType.HasValue)
|
||||
{
|
||||
var entities = Services.EntityService.GetPagedChildren(id, objectType.Value, pageNumber - 1, pageSize, out var totalRecords,
|
||||
SqlContext.Query<IUmbracoEntity>().Where(x => x.Name.Contains(filter)),
|
||||
filter.IsNullOrWhiteSpace()
|
||||
? null
|
||||
: SqlContext.Query<IUmbracoEntity>().Where(x => x.Name.Contains(filter)),
|
||||
Ordering.By(orderBy, orderDirection));
|
||||
|
||||
if (totalRecords == 0)
|
||||
|
||||
Reference in New Issue
Block a user