clean up membertype groups and props

This commit is contained in:
Per Ploug
2015-06-08 18:17:26 +02:00
parent e8abe4af2d
commit 120b7bae17

View File

@@ -114,6 +114,13 @@ namespace Umbraco.Web.Editors
///TODO: Validate the submitted model
//filter out empty properties
contentType.Groups = contentType.Groups.Where(x => x.Name.IsNullOrWhiteSpace() == false).ToList();
foreach (var group in contentType.Groups)
{
group.Properties = group.Properties.Where(x => x.Alias.IsNullOrWhiteSpace() == false).ToList();
}
var ctId = Convert.ToInt32(contentType.Id);
if (ctId > 0)