From e352c654202545448709d57e97ebf1435f6ba411 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 4 Feb 2016 19:16:45 +0100 Subject: [PATCH] fixes server side validation issue for content types --- src/Umbraco.Web/Editors/ContentTypeControllerBase.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs b/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs index 49829d984e..bc49e10f02 100644 --- a/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs +++ b/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs @@ -178,7 +178,7 @@ namespace Umbraco.Web.Editors if (ModelState.IsValid == false) { - throw CreateModelStateValidationException(ctId, contentTypeSave, ct); + throw CreateModelStateValidationException(ctId, contentTypeSave, ct); } //filter out empty properties @@ -385,7 +385,7 @@ namespace Umbraco.Web.Editors if (invalidCompositionException != null) { AddCompositionValidationErrors(contentTypeSave, invalidCompositionException.PropertyTypeAliases); - return CreateModelStateValidationException(ctId, contentTypeSave, ct); + return CreateModelStateValidationException(ctId, contentTypeSave, ct); } return null; } @@ -395,12 +395,14 @@ namespace Umbraco.Web.Editors /// /// /// + /// /// /// /// - private HttpResponseException CreateModelStateValidationException(int ctId, ContentTypeSave contentTypeSave, TContentType ct) + private HttpResponseException CreateModelStateValidationException(int ctId, TContentTypeSave contentTypeSave, TContentType ct) where TContentType : class, IContentTypeComposition where TContentTypeDisplay : ContentTypeCompositionDisplay + where TContentTypeSave : ContentTypeSave { TContentTypeDisplay forDisplay; if (ctId > 0)