API - fix check on app_config table
This commit is contained in:
parent
37f5cb9a37
commit
25bdb215cb
@ -56,7 +56,7 @@ def create_app() -> Flask:
|
|||||||
with app.app_context():
|
with app.app_context():
|
||||||
# Note: check if "app_config" table exist to avoid errors when
|
# Note: check if "app_config" table exist to avoid errors when
|
||||||
# dropping tables on dev environments
|
# dropping tables on dev environments
|
||||||
if db.engine.dialect.has_table(db.engine, 'app_config'):
|
if db.engine.dialect.has_table(db.engine.connect(), 'app_config'):
|
||||||
db_app_config = AppConfig.query.one_or_none()
|
db_app_config = AppConfig.query.one_or_none()
|
||||||
if not db_app_config:
|
if not db_app_config:
|
||||||
_, db_app_config = init_config()
|
_, db_app_config = init_config()
|
||||||
|
Loading…
Reference in New Issue
Block a user