From f86eb43a65126b99ec6563bc1434cc6eccbeeccf Mon Sep 17 00:00:00 2001 From: Thurloat Date: Tue, 30 Jul 2013 09:19:57 -0300 Subject: [PATCH] add safety net for auth_providers setting --- sentry_jira/plugin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sentry_jira/plugin.py b/sentry_jira/plugin.py index 818a46e..e10484b 100644 --- a/sentry_jira/plugin.py +++ b/sentry_jira/plugin.py @@ -99,7 +99,9 @@ def view(self, request, group, **kwargs): has_auth_configured = self.has_auth_configured() if not (has_auth_configured and self.is_configured(project=group.project, request=request)): if self.auth_provider: - required_auth_settings = settings.AUTH_PROVIDERS[self.auth_provider] + providers = settings.AUTH_PROVIDERS if hasattr( + settings, 'AUTH_PROVIDERS') else settings.SENTRY_AUTH_PROVIDERS + required_auth_settings = providers[self.auth_provider] else: required_auth_settings = None