WIP refactor commit for getting all variants at once saving, this requires pulling apart a lot of the models and corresponding binders and validators.

This commit is contained in:
Shannon
2018-07-19 19:32:07 +10:00
parent 888f8cfc56
commit 18cd9ea1e8
49 changed files with 1157 additions and 919 deletions

View File

@@ -58,13 +58,14 @@ namespace Umbraco.Web.Models.Mapping
// if it isn't one of the ones specified in 'includeProperties', we will just return the result without mapping the Value.
if (context.Options.Items.ContainsKey("IncludeProperties"))
{
var includeProperties = context.Options.Items["IncludeProperties"] as IEnumerable<string>;
if (includeProperties != null && includeProperties.Contains(property.Alias) == false)
if (context.Options.Items["IncludeProperties"] is IEnumerable<string> includeProperties
&& includeProperties.Contains(property.Alias) == false)
{
return result;
}
}
//Get the culture from the context which will be set during the mapping operation for each property
var culture = context.GetCulture();
//a culture needs to be in the context for a property type that can vary