Fixed issue when creating variant content templates, but the properties is invariant. Before this change an exception was thrown

This commit is contained in:
Bjarke Berg
2019-03-12 08:17:09 +01:00
committed by Shannon
parent 080ace90b2
commit 4fcf2ce7bd

View File

@@ -2875,7 +2875,14 @@ namespace Umbraco.Core.Services.Implement
{
foreach (var property in blueprint.Properties)
{
content.SetValue(property.Alias, property.GetValue(culture), culture);
if (property.PropertyType.VariesByCulture())
{
content.SetValue(property.Alias, property.GetValue(culture), culture);
}
else
{
content.SetValue(property.Alias, property.GetValue());
}
}
content.Name = blueprint.Name;