Fixes lookup for getting allowed child content types
This commit is contained in:
@@ -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));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ namespace Umbraco.Web.Models.Mapping
|
||||
_applicationContext = applicationContext;
|
||||
}
|
||||
|
||||
public ContentTypeBasic ToContentItemBasic(IContentType contentType)
|
||||
public ContentTypeBasic ToContentTypeBasic(IContentType contentType)
|
||||
{
|
||||
return new ContentTypeBasic
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user