Merge pull request #4784 from kjac/v8-fix-content-template-mixed-variance
V8: Handle mixed variance when creating content templates from content
This commit is contained in:
@@ -2885,14 +2885,8 @@ namespace Umbraco.Core.Services.Implement
|
||||
{
|
||||
foreach (var property in blueprint.Properties)
|
||||
{
|
||||
if (property.PropertyType.VariesByCulture())
|
||||
{
|
||||
content.SetValue(property.Alias, property.GetValue(culture), culture);
|
||||
}
|
||||
else
|
||||
{
|
||||
content.SetValue(property.Alias, property.GetValue());
|
||||
}
|
||||
var propertyCulture = property.PropertyType.VariesByCulture() ? culture : null;
|
||||
content.SetValue(property.Alias, property.GetValue(propertyCulture), propertyCulture);
|
||||
}
|
||||
|
||||
content.Name = blueprint.Name;
|
||||
|
||||
Reference in New Issue
Block a user