From 91f087141b74edcd7ed563a9310e3e86e0931be1 Mon Sep 17 00:00:00 2001 From: Tom Pipe Date: Thu, 20 Nov 2014 14:22:19 +0000 Subject: [PATCH] Reset the template when converting a doctype and the new doctype does not have a template assigned Fixes U4-5848 --- src/Umbraco.Web.UI/umbraco/dialogs/ChangeDocType.aspx.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI/umbraco/dialogs/ChangeDocType.aspx.cs b/src/Umbraco.Web.UI/umbraco/dialogs/ChangeDocType.aspx.cs index f71037fa36..38c6dfd2df 100644 --- a/src/Umbraco.Web.UI/umbraco/dialogs/ChangeDocType.aspx.cs +++ b/src/Umbraco.Web.UI/umbraco/dialogs/ChangeDocType.aspx.cs @@ -212,10 +212,7 @@ namespace Umbraco.Web.UI.Umbraco.Dialogs if (NewTemplateList.SelectedItem != null) { var templateId = int.Parse(NewTemplateList.SelectedItem.Value); - if (templateId > 0) - { - _content.Template = ApplicationContext.Current.Services.FileService.GetTemplate(templateId); - } + _content.Template = templateId > 0 ? ApplicationContext.Current.Services.FileService.GetTemplate(templateId) : null; } // Set the property values