Permalink
Browse files

Search index rebuild -> logging information about a published data it…

…em if it is missing from administrated scope
  • Loading branch information...
napernik committed Oct 26, 2018
1 parent b22de84 commit 8763abc877880a6974d1f9f1d376831134a2df0b
Showing with 8 additions and 3 deletions.
  1. +8 −3 Composite/Search/DocumentSources/DataTypeDocumentSource.cs
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
@@ -195,7 +195,6 @@ private SearchDocument FromData(IData data, CultureInfo culture)
var entityToken = GetConsoleEntityToken(data);
if (entityToken == null)
{
Log.LogWarning(LogTitle, $"Failed to obtain an entity token for a data item of type '{data.DataSourceId.InterfaceType}'");
return null;
}
@@ -212,7 +211,13 @@ private EntityToken GetConsoleEntityToken(IData data)
}
var administratedData = DataFacade.GetDataFromOtherScope(data, DataScopeIdentifier.Administrated).FirstOrDefault();
return administratedData?.GetDataEntityToken();
if (administratedData == null)
{
Log.LogWarning(LogTitle, $"The following data item exists in published scope, but doesn't exist in unpublished scope '{data.DataSourceId.Serialize()}'.");
return null;
}
return administratedData.GetDataEntityToken();
}
private string GetDocumentId(IData data)

0 comments on commit 8763abc

Please sign in to comment.