Don't reset templates for element types

This commit is contained in:
Kenn Jacobsen
2019-01-17 20:57:39 +01:00
parent 8f205e7d8f
commit fa8a754f88

View File

@@ -263,15 +263,6 @@ namespace Umbraco.Web.Editors
}
}
//Before we send this model into this saving/mapping pipeline, we also need to do some cleanup on templates.
//If the doc type is an element type, it can't have any templates assigned, so we need to reset the allowed templates here.
if (contentTypeSave.IsElement)
{
contentTypeSave.AllowedTemplates = new string[] { };
contentTypeSave.DefaultTemplate = null;
}
var savedCt = PerformPostSave<DocumentTypeDisplay, DocumentTypeSave, PropertyTypeBasic>(
contentTypeSave: contentTypeSave,
getContentType: i => Services.ContentTypeService.Get(i),