From ad14fbd1f83eaf444ef8f12cef68a9d84ca92373 Mon Sep 17 00:00:00 2001 From: Warren Date: Fri, 30 Mar 2018 21:01:24 +0100 Subject: [PATCH] Set the language to be mandatory too as well --- src/Umbraco.Web/Editors/LanguageController.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Umbraco.Web/Editors/LanguageController.cs b/src/Umbraco.Web/Editors/LanguageController.cs index f236115c94..e2439e0afc 100644 --- a/src/Umbraco.Web/Editors/LanguageController.cs +++ b/src/Umbraco.Web/Editors/LanguageController.cs @@ -47,7 +47,10 @@ namespace Umbraco.Web.Editors //if there's only one language, by default it is the default if (langs.Count == 1) + { langs[0].IsDefaultVariantLanguage = true; + langs[0].Mandatory = true; + } else if (allLanguages.All(x => !x.IsDefaultVariantLanguage)) { //if no language has the default flag, then the defaul language is the one with the lowest id @@ -72,7 +75,10 @@ namespace Umbraco.Web.Editors if (!lang.IsDefaultVariantLanguage) { if (allLangs.Count == 1) + { model.IsDefaultVariantLanguage = true; + model.Mandatory = true; + } else if (allLangs.All(x => !x.IsDefaultVariantLanguage)) { //if no language has the default flag, then the defaul language is the one with the lowest id