From 41394999f40de07731a0a1a705b6bca816417709 Mon Sep 17 00:00:00 2001 From: cuiweizhi <560397@gree.com.cn> Date: Sat, 4 Nov 2023 12:29:45 +0800 Subject: [PATCH] Update project --- application/extensions/init_sqlalchemy.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/application/extensions/init_sqlalchemy.py b/application/extensions/init_sqlalchemy.py index adc777e..f09733f 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, -- GitLab