ensures that only the default variant is available when creating content

This commit is contained in:
Shannon
2018-04-09 15:01:55 +10:00
parent 0971aa0ab6
commit 1660d25bad

View File

@@ -305,7 +305,12 @@ namespace Umbraco.Web.Editors
//remove this tab if it exists: umbContainerView
var containerTab = mapped.Tabs.FirstOrDefault(x => x.Alias == Constants.Conventions.PropertyGroups.ListViewGroupName);
mapped.Tabs = mapped.Tabs.Except(new[] { containerTab });
mapped.Tabs = mapped.Tabs.Except(new[] { containerTab });
//Remove all variants except for the default since currently the default must be saved before other variants can be edited
//TODO: Allow for editing all variants at once ... this will be a future task
mapped.Variants = new[] {mapped.Variants.First(x => x.IsCurrent)};
return mapped;
}