Merge pull request #5180 from kjac/v8-fix-save-variant-content

V8: YSOD when saving variant content (mapping issue)
This commit is contained in:
Stephan
2019-04-07 10:29:37 +02:00
committed by GitHub

View File

@@ -64,7 +64,8 @@ namespace Umbraco.Web.Models.Mapping
// Umbraco.Code.MapAll
private static void Map(IContent source, ContentPropertyCollectionDto target, MapperContext context)
{
target.Properties = source.Properties.Select(context.Mapper.Map<ContentPropertyDto>);
// must pass the context through
target.Properties = source.Properties.Select(p => context.Mapper.Map<ContentPropertyDto>(p, context));
}
// Umbraco.Code.MapAll -AllowPreview -Errors -PersistedContent