Fix order of property group inserts
This commit is contained in:
@@ -175,7 +175,7 @@ AND umbracoNode.nodeObjectType = @objectType",
|
||||
}
|
||||
|
||||
//Insert Tabs
|
||||
foreach (var propertyGroup in entity.PropertyGroups.OrderBy(g => g.Level))
|
||||
foreach (var propertyGroup in entity.PropertyGroups.OrderBy(x => x.Level).ToArray())
|
||||
{
|
||||
var tabDto = PropertyGroupFactory.BuildGroupDto(propertyGroup, nodeDto.NodeId);
|
||||
var primaryKey = Convert.ToInt32(Database.Insert(tabDto));
|
||||
@@ -374,7 +374,7 @@ AND umbracoNode.id <> @id",
|
||||
}
|
||||
|
||||
// insert or update groups, assign properties
|
||||
foreach (var propertyGroup in entity.PropertyGroups.OrderBy(x => x.Level))
|
||||
foreach (var propertyGroup in entity.PropertyGroups.OrderBy(x => x.Level).ToArray())
|
||||
{
|
||||
// insert or update group
|
||||
var groupDto = PropertyGroupFactory.BuildGroupDto(propertyGroup, entity.Id);
|
||||
|
||||
@@ -200,7 +200,7 @@ namespace Umbraco.Web.Models.Mapping
|
||||
group.ParentTabContentTypeNames = parentGroups.SelectMany(x => x.ParentTabContentTypeNames).ToArray();
|
||||
}
|
||||
|
||||
return groups.OrderBy(x => x.Level).ThenBy(x => x.SortOrder);
|
||||
return groups.OrderBy(x => x.Level).ThenBy(x => x.SortOrder).ToArray();
|
||||
}
|
||||
|
||||
private IEnumerable<TPropertyType> MapProperties(IEnumerable<PropertyType> properties, IContentTypeBase contentType, int groupId, bool inherited)
|
||||
|
||||
Reference in New Issue
Block a user