diff --git a/BuildFeed/Code/LocalController.cs b/BuildFeed/Code/LocalController.cs index 7f585b0..8c28d97 100644 --- a/BuildFeed/Code/LocalController.cs +++ b/BuildFeed/Code/LocalController.cs @@ -13,7 +13,7 @@ protected override void Initialize(RequestContext requestContext) { try { - CultureInfo ci = new CultureInfo(cookie.Value); + CultureInfo ci = CultureInfo.GetCultureInfo(cookie.Value); CultureInfo.CurrentCulture = ci; CultureInfo.CurrentUICulture = ci; } diff --git a/BuildFeed/Models/Build/Build.cs b/BuildFeed/Models/Build/Build.cs index ab3ab70..1069f2d 100644 --- a/BuildFeed/Models/Build/Build.cs +++ b/BuildFeed/Models/Build/Build.cs @@ -41,6 +41,14 @@ await _buildCollection.Indexes.CreateOneAsync(Builders.IndexKeys.Com Name = "_idx_group" }); } + + if (!indexes.Any(i => i["name"] == "_idx_legacy")) + { + await _buildCollection.Indexes.CreateOneAsync(Builders.IndexKeys.Ascending(b => b.LegacyId), new CreateIndexOptions() + { + Name = "_idx_legacy" + }); + } } [DataObjectMethod(DataObjectMethodType.Select, true)]