Code tweaks from PR review - also led to adding logging for Deserialization issues and therefore needing to mock the logger for the tests
This commit is contained in:
@@ -177,9 +177,8 @@ namespace Umbraco.Web.Models.Mapping
|
||||
|
||||
target.Name = source.Values.ContainsKey("nodeName") ? source.Values["nodeName"] : "[no name]";
|
||||
|
||||
if (source.Values.ContainsKey(UmbracoExamineIndex.UmbracoFileFieldName))
|
||||
if (source.Values.TryGetValue(UmbracoExamineIndex.UmbracoFileFieldName, out var umbracoFile))
|
||||
{
|
||||
var umbracoFile = source.Values[UmbracoExamineIndex.UmbracoFileFieldName];
|
||||
if (umbracoFile != null)
|
||||
{
|
||||
target.Name = $"{target.Name} ({umbracoFile})";
|
||||
|
||||
Reference in New Issue
Block a user