Skip to content

Commit

Permalink
fix startup issue with no config
Browse files Browse the repository at this point in the history
  • Loading branch information
RaidMax committed Apr 9, 2023
1 parent b1f3155 commit 892d2c8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Application/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,13 @@ private static void ConfigureServices(IServiceCollection serviceCollection)
};
var masterRestClient = RestClient.For<IMasterApi>(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)
Expand Down

0 comments on commit 892d2c8

Please sign in to comment.