do not raise ImproperlyConfigured on acces to app_settings.IDENTITY_PROVIDERS (fixes #20221)
This commit is contained in:
parent
ac75dce84f
commit
b66a974922
|
@ -28,6 +28,9 @@ class DefaultAdapter(object):
|
|||
return idp
|
||||
|
||||
def get_identity_providers_setting(self):
|
||||
if not app_settings.IDENTITY_PROVIDERS:
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
raise ImproperlyConfigured('The MELLON_IDENTITY_PROVIDERS setting is mandatory')
|
||||
return app_settings.IDENTITY_PROVIDERS
|
||||
|
||||
def get_idps(self):
|
||||
|
|
|
@ -45,8 +45,7 @@ class AppSettings(object):
|
|||
try:
|
||||
idps = settings.MELLON_IDENTITY_PROVIDERS
|
||||
except AttributeError:
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
raise ImproperlyConfigured('The MELLON_IDENTITY_PROVIDERS setting is mandatory')
|
||||
return []
|
||||
if isinstance(idps, dict):
|
||||
idps = [idps]
|
||||
return idps
|
||||
|
|
Loading…
Reference in New Issue