From 6666f6aab7c3f62eefb52609a2889148c3517c53 Mon Sep 17 00:00:00 2001 From: Elitsa Marinovska Date: Thu, 14 Oct 2021 14:57:52 +0200 Subject: [PATCH] Rename based on review comments --- src/Umbraco.Web/Editors/ContentTypeControllerBase.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs b/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs index 60e10313ca..b38e2b619f 100644 --- a/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs +++ b/src/Umbraco.Web/Editors/ContentTypeControllerBase.cs @@ -456,10 +456,10 @@ namespace Umbraco.Web.Editors { // if it's not successful then we need to return some model state for the property type and property group // aliases that are duplicated - var invalidPropertyTypeAliases = validateAttempt.Result.Distinct(); + var duplicatePropertyTypeAliases = validateAttempt.Result.Distinct(); var invalidPropertyGroupAliases = (validateAttempt.Exception as InvalidCompositionException)?.PropertyGroupAliases ?? Array.Empty(); - AddCompositionValidationErrors(contentTypeSave, invalidPropertyTypeAliases, invalidPropertyGroupAliases); + AddCompositionValidationErrors(contentTypeSave, duplicatePropertyTypeAliases, invalidPropertyGroupAliases); var display = Mapper.Map(composition); //map the 'save' data on top @@ -474,14 +474,14 @@ namespace Umbraco.Web.Editors /// Adds errors to the model state if any invalid aliases are found then throws an error response if there are errors /// /// - /// + /// /// /// - private void AddCompositionValidationErrors(TContentTypeSave contentTypeSave, IEnumerable invalidPropertyTypeAliases, IEnumerable invalidPropertyGroupAliases) + private void AddCompositionValidationErrors(TContentTypeSave contentTypeSave, IEnumerable duplicatePropertyTypeAliases, IEnumerable invalidPropertyGroupAliases) where TContentTypeSave : ContentTypeSave where TPropertyType : PropertyTypeBasic { - foreach (var propertyTypeAlias in invalidPropertyTypeAliases) + foreach (var propertyTypeAlias in duplicatePropertyTypeAliases) { // Find the property type relating to these var property = contentTypeSave.Groups.SelectMany(x => x.Properties).Single(x => x.Alias == propertyTypeAlias);