summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2020-04-02 19:45:52 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2020-04-03 06:26:20 (GMT)
commit72f29fcd68dc60fed12a388c59f8b5189dc5c28f (patch)
tree3b902bb834de19a469d456ad7e9f2c056a3a3b35
parentcd9a25a069dd89aae36f07fc503b759cda35115d (diff)
downloadwelco-72f29fcd68dc60fed12a388c59f8b5189dc5c28f.zip
welco-72f29fcd68dc60fed12a388c59f8b5189dc5c28f.tar.gz
welco-72f29fcd68dc60fed12a388c59f8b5189dc5c28f.tar.bz2
misc: import mellon only if declared in installed apps (#41286)
-rw-r--r--welco/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/welco/views.py b/welco/views.py
index fd6ab38..b8d7ae5 100644
--- a/welco/views.py
+++ b/welco/views.py
@@ -33,9 +33,9 @@ from django.utils.translation import ugettext_lazy as _
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import TemplateView
-try:
+if 'mellon' in settings.INSTALLED_APPS:
from mellon.utils import get_idps
-except ImportError:
+else:
get_idps = lambda: []
from .sources.mail.views import Home as MailHome