diff --git a/src/Umbraco.Core/Services/ContentService.cs b/src/Umbraco.Core/Services/ContentService.cs index 0723431ada..f76ecad963 100644 --- a/src/Umbraco.Core/Services/ContentService.cs +++ b/src/Umbraco.Core/Services/ContentService.cs @@ -578,11 +578,9 @@ namespace Umbraco.Core.Services var repository = RepositoryFactory.CreateContentRepository(uow); var query = Query.Builder; - //if the id is System Root, then just get all - if (id != Constants.System.Root) - { - query.Where(x => x.ParentId == id); - } + // always check for a parent - else it will also get decendants (and then you should use the GetPagedDescendants method) + query.Where(x => x.ParentId == id); + IQuery filterQuery = null; if (filter.IsNullOrWhiteSpace() == false) { diff --git a/src/Umbraco.Core/Services/MediaService.cs b/src/Umbraco.Core/Services/MediaService.cs index da5bc4ee43..48db7f8ced 100644 --- a/src/Umbraco.Core/Services/MediaService.cs +++ b/src/Umbraco.Core/Services/MediaService.cs @@ -457,7 +457,7 @@ namespace Umbraco.Core.Services var repository = RepositoryFactory.CreateMediaRepository(uow); var query = Query.Builder; - // always check for a parent - else it will also get decendants + // always check for a parent - else it will also get decendants (and then you should use the GetPagedDescendants method) query.Where(x => x.ParentId == id); IQuery filterQuery = null;