Skip to content

Commit 54c0331

Browse files
SSO/logistration: lazy‑load third_party_auth_context to break import cycle
1 parent aa1b064 commit 54c0331

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • openedx/features/enterprise_support

openedx/features/enterprise_support/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers
2626
from openedx.core.djangoapps.user_authn.cookies import standard_cookie_settings
2727
from openedx.core.djangolib.markup import HTML, Text
28-
from openedx.core.djangoapps.user_authn.views.utils import third_party_auth_context
2928
from ipware import get_client_ip
3029

3130
ENTERPRISE_HEADER_LINKS = WaffleFlag('enterprise.enterprise_header_links', __name__) # lint-amnesty, pylint: disable=toggle-missing-annotation
@@ -508,6 +507,9 @@ def get_mfe_context(request, redirect_to, tpa_hint=None):
508507
"""
509508
# Import enterprise functions INSIDE the function to avoid circular import
510509
from openedx.features.enterprise_support.api import enterprise_customer_for_request
510+
# Importing third_party_auth_context here to avoid circular import since it imports get_mfe_context
511+
from openedx.core.djangoapps.user_authn.views.utils import third_party_auth_context
512+
511513

512514
ip_address = get_client_ip(request)[0]
513515
country_code = country_code_from_ip(ip_address)

0 commit comments

Comments
 (0)