From 8bb9a8c5d115d238a50a1ae2bcd96678d7b67d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20H=C3=A4hnel?= Date: Wed, 30 Dec 2015 14:56:59 +0100 Subject: [PATCH] Define ACTIVE_PROVIDERS in default config The configuration item ACTIVE_PROVIDERS must be initialized Workaround for this error: 2015-12-30 13:58:48,073 ERROR: Internal Error [in /www/lemur/local/lib/python2.7/site-packages/flask_restful/__init__.py:299] Traceback (most recent call last): File "/www/lemur/local/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request rv = self.dispatch_request() File "/www/lemur/local/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/www/lemur/local/lib/python2.7/site-packages/flask_restful/__init__.py", line 462, in wrapper resp = resource(*args, **kwargs) File "/www/lemur/local/lib/python2.7/site-packages/flask/views.py", line 84, in view return self.dispatch_request(*args, **kwargs) File "/www/lemur/local/lib/python2.7/site-packages/flask_restful/__init__.py", line 572, in dispatch_request resp = meth(*args, **kwargs) File "/www/lemur/lemur/auth/views.py", line 276, in get for provider in current_app.config.get("ACTIVE_PROVIDERS"): TypeError: 'NoneType' object is not iterable --- lemur/manage.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lemur/manage.py b/lemur/manage.py index fcf4261c..c3e94b57 100755 --- a/lemur/manage.py +++ b/lemur/manage.py @@ -90,6 +90,8 @@ LEMUR_DEFAULT_LOCATION = '' LEMUR_DEFAULT_ORGANIZATION = '' LEMUR_DEFAULT_ORGANIZATIONAL_UNIT = '' +# Authentication Providers +ACTIVE_PROVIDERS = [] # Logging