From 85ea74903aeb383a6c51018dc461925d804eb9e0 Mon Sep 17 00:00:00 2001 From: Oleg Dopertchouk Date: Mon, 1 Apr 2024 14:20:31 -0400 Subject: [PATCH 1/2] checking for existence of custom field --- lemur/factory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lemur/factory.py b/lemur/factory.py index 15dd3f278c..c5b262962d 100644 --- a/lemur/factory.py +++ b/lemur/factory.py @@ -60,7 +60,7 @@ def create_app(app_name=None, blueprints=None, config=None): # get config option value from command line if ctx and config is None: script_info = ctx.obj - if script_info: + if script_info and getattr(script_info, 'config'): config = script_info.config configure_app(app, config) From 04233732e07c5b2958811fc6b2ea85a9e9e56453 Mon Sep 17 00:00:00 2001 From: Oleg Dopertchouk Date: Mon, 1 Apr 2024 14:22:10 -0400 Subject: [PATCH 2/2] better handling --- lemur/factory.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lemur/factory.py b/lemur/factory.py index c5b262962d..e2bb4dbea4 100644 --- a/lemur/factory.py +++ b/lemur/factory.py @@ -60,8 +60,8 @@ def create_app(app_name=None, blueprints=None, config=None): # get config option value from command line if ctx and config is None: script_info = ctx.obj - if script_info and getattr(script_info, 'config'): - config = script_info.config + if script_info: + config = getattr(script_info, 'config') configure_app(app, config) configure_blueprints(app, blueprints)