fixes a null check

This commit is contained in:
Shannon
2014-11-26 10:20:19 +11:00
parent a41d37b1cf
commit bece953fa3

View File

@@ -117,7 +117,8 @@ namespace Umbraco.Web.Models.Mapping
//fill in the template config to be passed to the template drop down.
var templateItemConfig = new Dictionary<string, string> { { "", "Choose..." } };
foreach (var t in content.ContentType.AllowedTemplates)
foreach (var t in content.ContentType.AllowedTemplates
.Where(t => t.Alias.IsNullOrWhiteSpace() == false && t.Name.IsNullOrWhiteSpace() == false))
{
templateItemConfig.Add(t.Alias, t.Name);
}