|
|
|
@ -97,14 +97,20 @@ namespace Expedience.Api.Consumers
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_logger.LogInformation("Territory with Id {territoryId} with name {contentName}", territory.TerritoryId, territory.ContentName);
|
|
|
|
_logger.LogInformation("Territory with Id {territoryId} with name {contentName} already exists", territory.TerritoryId, territory.ContentName);
|
|
|
|
|
|
|
|
|
|
|
|
if (String.IsNullOrWhiteSpace(territory.ContentName))
|
|
|
|
if (String.IsNullOrWhiteSpace(territory.ContentName))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_logger.LogInformation("Updating territory {territoryId} with content name {contentName} and place name {placeName}",
|
|
|
|
_logger.LogInformation("Updating territory {territoryId} content name to {contentName}",
|
|
|
|
completionResult.TerritoryId, message.DutyInfo.ContentName, message.DutyInfo.PlaceName);
|
|
|
|
completionResult.TerritoryId, message.DutyInfo.ContentName);
|
|
|
|
// Update the place/content name if necessary
|
|
|
|
territory.ContentName = message.DutyInfo.ContentName ?? "";
|
|
|
|
territory.ContentName = message.DutyInfo.ContentName;
|
|
|
|
}
|
|
|
|
territory.PlaceName = message.DutyInfo.PlaceName;
|
|
|
|
|
|
|
|
|
|
|
|
if (String.IsNullOrWhiteSpace (territory.PlaceName))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_logger.LogInformation("Updating territory {territoryId} place name to {placeName}",
|
|
|
|
|
|
|
|
completionResult.TerritoryId, message.DutyInfo.PlaceName);
|
|
|
|
|
|
|
|
territory.PlaceName = message.DutyInfo.PlaceName ?? "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|