mirror of
https://github.com/optim-enterprises-bv/Mailu.git
synced 2025-11-02 11:08:01 +00:00
Fix DB_FLAVOR condition testing for models.py
This commit is contained in:
@@ -66,16 +66,20 @@ class ConfigManager(dict):
|
||||
|
||||
def __init__(self):
|
||||
self.config = dict()
|
||||
self.parse_env()
|
||||
|
||||
def init_app(self, app):
|
||||
self.config.update(app.config)
|
||||
self.parse_env()
|
||||
if self.config['DB_FLAVOR'] != 'sqlite':
|
||||
self.setsql()
|
||||
app.config = self
|
||||
|
||||
def parse_env(self):
|
||||
self.config.update({
|
||||
key: os.environ.get(key, value)
|
||||
for key, value in DEFAULT_CONFIG.items()
|
||||
})
|
||||
if self.config['DB_FLAVOR'] != 'sqlite':
|
||||
self.setsql()
|
||||
app.config = self
|
||||
|
||||
def setsql(self):
|
||||
if not self.config['DB_PW']:
|
||||
|
||||
Reference in New Issue
Block a user