Skip to content

Commit 2a9edce

Browse files
refactor: move authzenforcer to ready hook
1 parent 9d33314 commit 2a9edce

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

openedx_authz/apps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from django.apps import AppConfig
66
from django.conf import settings
77

8-
from openedx_authz.engine.enforcer import AuthzEnforcer
98

109

1110
class OpenedxAuthzConfig(AppConfig):
@@ -46,6 +45,7 @@ class OpenedxAuthzConfig(AppConfig):
4645
def ready(self):
4746
"""Initialization layer for the openedx_authz app."""
4847
# Initialize the enforcer to ensure it's ready when the app starts
48+
from openedx_authz.engine.enforcer import AuthzEnforcer
4949
casbin_adapter_app = "casbin_adapter.apps.CasbinAdapterConfig"
5050
if casbin_adapter_app not in settings.INSTALLED_APPS:
5151
settings.INSTALLED_APPS.append(casbin_adapter_app)

0 commit comments

Comments
 (0)