From cd9ba93d7d7cf9fee3b716a5238af61f1a9905f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 3 Aug 2021 14:57:50 +0200 Subject: [PATCH] trivial: update another location of authentic2.utils usage (#55937) --- src/authentic2_auth_fedict/adapters.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/authentic2_auth_fedict/adapters.py b/src/authentic2_auth_fedict/adapters.py index d70a072..6979f25 100644 --- a/src/authentic2_auth_fedict/adapters.py +++ b/src/authentic2_auth_fedict/adapters.py @@ -32,9 +32,13 @@ import lasso from mellon.adapters import DefaultAdapter, app_settings import mellon.utils as mellon_utils from authentic2.models import Attribute -from authentic2 import utils from authentic2.a2_rbac.utils import get_default_ou +try: + import authentic2.utils.misc as a2_utils_misc +except ImportError: + import authentic2.utils as a2_utils_misc + def check_nrn(nrn): remainder = (97 - int(nrn[:9])) % 97 @@ -52,7 +56,7 @@ def check_nrn_y2k(nrn): class AuthenticAdapter(DefaultAdapter): def auth_login(self, request, user): - utils.login(request, user, 'fedict') + a2_utils_misc.login(request, user, 'fedict') def get_identity_providers_setting(self): providers = app_settings.IDENTITY_PROVIDERS