Fix ContetIndexPopulator publishedQuery

This commit is contained in:
Harmen Kooiker
2019-10-11 09:38:43 +02:00
parent ec6b38175c
commit 79e6c106d3

View File

@@ -52,7 +52,7 @@ namespace Umbraco.Examine
if (sqlContext == null) throw new ArgumentNullException(nameof(sqlContext));
_contentService = contentService ?? throw new ArgumentNullException(nameof(contentService));
_contentValueSetBuilder = contentValueSetBuilder ?? throw new ArgumentNullException(nameof(contentValueSetBuilder));
if (_publishedQuery != null)
if (_publishedQuery == null)
_publishedQuery = sqlContext.Query<IContent>().Where(x => x.Published);
_publishedValuesOnly = publishedValuesOnly;
_parentId = parentId;