This commit is contained in:
Bjarke Berg
2019-01-08 22:30:12 +01:00
parent 33ee239406
commit 9bbe743686

View File

@@ -515,11 +515,16 @@ namespace Umbraco.Web.Editors
[HttpPost]
public SimpleNotificationModel CreateBlueprintFromContent([FromUri]int contentId, [FromUri]string name)
{
if (string.IsNullOrWhiteSpace(name)) throw new ArgumentException("Value cannot be null or whitespace.", "name");
if (string.IsNullOrWhiteSpace(name))
{
throw new ArgumentException("Value cannot be null or whitespace.", "name");
}
var content = Services.ContentService.GetById(contentId);
if (content == null)
{
throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound));
}
EnsureUniqueName(name, content, "name");