It should not be possible for a ContentType to add itself as a composition

This commit is contained in:
Morten Christensen
2014-11-28 13:11:11 +01:00
parent ef6a4139de
commit c37777b289

View File

@@ -76,6 +76,9 @@ namespace Umbraco.Core.Models
if (contentType.ContentTypeComposition.Any(x => x.CompositionAliases().Any(ContentTypeCompositionExists)))
return false;
if (Alias.Equals(contentType.Alias))
return false;
if (ContentTypeCompositionExists(contentType.Alias) == false)
{
//Before we actually go ahead and add the ContentType as a Composition we ensure that we don't