Invariant property value should persist trough all variants of a content item

This commit is contained in:
Robert
2018-05-04 13:44:04 +02:00
parent 48c70604a9
commit c5de31cce3

View File

@@ -46,12 +46,17 @@ namespace Umbraco.Web.Models.Mapping
editor = _propertyEditors[Constants.PropertyEditors.Aliases.NoEdit];
}
var culture = context.GetCulture();
var culture = context.GetCulture();
if (culture == null && property.PropertyType.Variations == ContentVariation.CultureNeutral)
{
//a language Id needs to be set for a property type that can be varried by language
throw new InvalidOperationException($"No languageId found in mapping operation when one is required for the culture neutral property type {property.PropertyType.Alias}");
}
if (property.PropertyType.Variations == ContentVariation.InvariantNeutral)
{
culture = null;
}
var result = new TDestination