From 3c2b6c6111a8910e42412daa1f89402834f0aa86 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Tue, 23 Nov 2010 12:43:09 -0800 Subject: [PATCH] Fixing new content type validation Work Item: 16471 --HG-- branch : dev --- .../Orchard.ContentTypes/Controllers/AdminController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs index 218f6faf0..f4d408d2e 100644 --- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs @@ -52,13 +52,13 @@ namespace Orchard.ContentTypes.Controllers { ModelState.AddModelError("DisplayName", T("A type with the same name already exists.").ToString()); } - var typeViewModel = _contentDefinitionService.AddType(viewModel); - if (!ModelState.IsValid) { Services.TransactionManager.Cancel(); return View(viewModel); } + var typeViewModel = _contentDefinitionService.AddType(viewModel); + Services.Notifier.Information(T("The \"{0}\" content type has been created.", typeViewModel.DisplayName)); return RedirectToAction("Edit", new { id = typeViewModel.Name });