From 13a6e117834b17f6bfed8bd14644531453ead14f Mon Sep 17 00:00:00 2001 From: Mole Date: Fri, 9 Apr 2021 09:39:49 +0200 Subject: [PATCH] Re add check for CreateTemplateForContentType in ModelsBuilderNotificationHandler --- .../ModelsBuilder/ModelsBuilderNotificationHandler.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Umbraco.Web.Common/ModelsBuilder/ModelsBuilderNotificationHandler.cs b/src/Umbraco.Web.Common/ModelsBuilder/ModelsBuilderNotificationHandler.cs index 66c3013596..1c8d00d9aa 100644 --- a/src/Umbraco.Web.Common/ModelsBuilder/ModelsBuilderNotificationHandler.cs +++ b/src/Umbraco.Web.Common/ModelsBuilder/ModelsBuilderNotificationHandler.cs @@ -97,6 +97,12 @@ namespace Umbraco.Cms.Web.Common.ModelsBuilder return; } + // Don't do anything if we're not requested to create a template for a content type + if (notification.CreateTemplateForContentType is null or false) + { + return; + } + // ensure we have the content type alias if (notification.ContentTypeAlias is null) {