Invariant property value should persist trough all variants of a content item
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user