Skip to content

Commit

Permalink
fixup! refactor: Use derived_settings to lazy load settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
feanil committed Jan 16, 2025
1 parent a13a383 commit ee98c8e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lms/envs/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,7 @@ def get_env_setting(setting):
ENTERPRISE_PUBLIC_ENROLLMENT_API_URL = lambda settings: (settings.LMS_ROOT_URL or '') + settings.LMS_ENROLLMENT_API_PATH

# Enrollment URL used on the server-side.
ENTERPRISE_ENROLLMENT_API_URL = _YAML_TOKENS.get(
'ENTERPRISE_ENROLLMENT_API_URL',
(LMS_INTERNAL_ROOT_URL or '') + LMS_ENROLLMENT_API_PATH
)
ENTERPRISE_ENROLLMENT_API_URL = lambda settings: (settisgs.LMS_INTERNAL_ROOT_URL or '') + settings.LMS_ENROLLMENT_API_PATH

############## ENTERPRISE SERVICE API CLIENT CONFIGURATION ######################
# The LMS communicates with the Enterprise service via the requests.Session() client
Expand Down Expand Up @@ -210,6 +207,7 @@ def _generate_default_enterprise_consent_api_url(settings):
'PROGRAM_CERTIFICATES_ROUTING_KEY',
'SOFTWARE_SECURE_VERIFICATION_ROUTING_KEY',
'ENTERPRISE_PUBLIC_ENROLLMENT_API_URL',
'ENTERPRISE_ENROLLMENT_API_URL',
'ENTERPRISE_API_URL',
'ENTERPRISE_CONSENT_API_URL',
)
Expand Down

0 comments on commit ee98c8e

Please sign in to comment.