Fixes lookup for getting allowed child content types

This commit is contained in:
Shannon Deminick
2013-06-07 02:45:06 -10:00
parent 9cfbb24f4c
commit 6028cebc90
2 changed files with 7 additions and 3 deletions

View File

@@ -44,8 +44,12 @@ namespace Umbraco.Web.Editors
{
throw new HttpResponseException(HttpStatusCode.NotFound);
}
return Services.ContentTypeService.GetContentTypeChildren(contentItem.ContentTypeId)
.Select(x => _contentTypeModelMapper.ToContentItemBasic(x));
return contentItem.ContentType.AllowedContentTypes
.Select(x => Services.ContentTypeService.GetContentType(x.Id.Value))
.Select(x => _contentTypeModelMapper.ToContentTypeBasic(x));
}
}
}

View File

@@ -13,7 +13,7 @@ namespace Umbraco.Web.Models.Mapping
_applicationContext = applicationContext;
}
public ContentTypeBasic ToContentItemBasic(IContentType contentType)
public ContentTypeBasic ToContentTypeBasic(IContentType contentType)
{
return new ContentTypeBasic
{