From 892d2c8fc534ed346de9df561268e89a15d056b2 Mon Sep 17 00:00:00 2001 From: RaidMax Date: Sun, 9 Apr 2023 09:59:10 -0500 Subject: [PATCH] fix startup issue with no config --- Application/Main.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Application/Main.cs b/Application/Main.cs index e9a855171..a683a8653 100644 --- a/Application/Main.cs +++ b/Application/Main.cs @@ -388,6 +388,13 @@ private static void ConfigureServices(IServiceCollection serviceCollection) }; var masterRestClient = RestClient.For(httpClient); var translationLookup = Configure.Initialize(Utilities.DefaultLogger, masterRestClient, appConfig); + + if (appConfig == null) + { + appConfig = (ApplicationConfiguration) new ApplicationConfiguration().Generate(); + appConfigHandler.Set(appConfig); + appConfigHandler.Save().GetAwaiter().GetResult(); + } // register override level names foreach (var (key, value) in appConfig.OverridePermissionLevelNames)