Include AdditionalData when mapping IEntitySlim to EntityBasic

This commit is contained in:
Kenn Jacobsen
2019-04-06 12:24:41 +02:00
parent 9d9c201984
commit f5ad4c67eb

View File

@@ -45,6 +45,13 @@ namespace Umbraco.Web.Models.Mapping
if (source.NodeObjectType == Constants.ObjectTypes.Member && target.Icon.IsNullOrWhiteSpace())
target.Icon = "icon-user";
// NOTE: we're mapping the objects in AdditionalData by object reference here.
// it works fine for now, but it's something to keep in mind in the future
foreach(var kvp in source.AdditionalData)
{
target.AdditionalData[kvp.Key] = kvp.Value;
}
target.AdditionalData.Add("IsContainer", source.IsContainer);
}