diff --git a/application/extensions/init_sqlalchemy.py b/application/extensions/init_sqlalchemy.py index adc777ecc15d7f1bd3e26f56f2a7f7c07bebe3f3..f09733f17f99594efc19c825c9db214b72d93ccc 100644 --- a/application/extensions/init_sqlalchemy.py +++ b/application/extensions/init_sqlalchemy.py @@ -25,9 +25,7 @@ def init_database(app: Flask) -> None: :param app: flask.Flask application instance :return: None """ - cfg = app.config.get('Database') - if cfg is None: - raise KeyError('Key Database error') + cfg = app.config.Database uri = DatabaseURI( db_type=cfg.Type, username=cfg.Username,