Doctype alias validation always fails
As it only checks if there is a doctype with the same alias, but does not test if this doctype is the same as the one currently being saved.
This commit is contained in:
@@ -191,7 +191,7 @@ namespace Umbraco.Web.Editors
|
||||
|
||||
//Validate that there's no other ct with the same name
|
||||
var exists = getContentTypeByAlias(contentTypeSave.Alias);
|
||||
if (exists != null)
|
||||
if (exists != null && exists.Id != ctId)
|
||||
{
|
||||
ModelState.AddModelError("Alias", "A content type with this alias already exists");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user