mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 11:44:58 +08:00
Fixing a bug with editing content types when there's a model error
--HG-- branch : dev
This commit is contained in:
@@ -86,7 +86,11 @@ namespace Orchard.ContentTypes.Controllers {
|
||||
if (typeViewModel == null)
|
||||
return HttpNotFound();
|
||||
|
||||
if (!TryUpdateModel(typeViewModel))
|
||||
var edited = new EditTypeViewModel();
|
||||
TryUpdateModel(edited);
|
||||
typeViewModel.DisplayName = edited.DisplayName;
|
||||
|
||||
if (!ModelState.IsValid)
|
||||
return View(typeViewModel);
|
||||
|
||||
_contentDefinitionService.AlterType(typeViewModel, this);
|
||||
|
Reference in New Issue
Block a user