From 9bbe743686c14cba801e8e4a4a1f26d10ad49566 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 8 Jan 2019 22:30:12 +0100 Subject: [PATCH] syntax --- src/Umbraco.Web/Editors/ContentController.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Editors/ContentController.cs b/src/Umbraco.Web/Editors/ContentController.cs index 9f0e350e55..c444fd8d39 100644 --- a/src/Umbraco.Web/Editors/ContentController.cs +++ b/src/Umbraco.Web/Editors/ContentController.cs @@ -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");