U4-10964 Adding a new property to a MemberType if you are not in Sensitive Data group throws a 404 when saving

This commit is contained in:
Sebastiaan Jansssen
2018-02-23 13:17:24 +01:00
parent e433daf5ff
commit c165a34ed7

View File

@@ -144,6 +144,10 @@ namespace Umbraco.Web.Editors
{
foreach (var prop in props)
{
// Id 0 means the property was just added, no need to look it up
if (prop.Id == 0)
continue;
var foundOnContentType = ct.PropertyTypes.FirstOrDefault(x => x.Id == prop.Id);
if (foundOnContentType == null)
throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.NotFound, "No property type with id " + prop.Id + " found on the content type"));