mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-10-03 15:56:17 +00:00
refac: save config before accessing it
This commit is contained in:
@@ -96,12 +96,14 @@ class DashboardConfig:
|
||||
if not exist:
|
||||
self.SetConfig(section, key, value, True)
|
||||
|
||||
self.SetConfig("Server", "version", DashboardConfig.DashboardVersion)
|
||||
self.SaveConfig()
|
||||
|
||||
self.engine = db.create_engine(ConnectionString(DEFAULT_DB))
|
||||
self.dbMetadata = db.MetaData()
|
||||
self.__createAPIKeyTable()
|
||||
self.DashboardAPIKeys = self.__getAPIKeys()
|
||||
self.APIAccessed = False
|
||||
self.SetConfig("Server", "version", DashboardConfig.DashboardVersion)
|
||||
|
||||
def __createAPIKeyTable(self):
|
||||
self.apiKeyTable = db.Table('DashboardAPIKeys', self.dbMetadata,
|
||||
|
Reference in New Issue
Block a user