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 17, 2025
1 parent 568c733 commit 47c7e52
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lms/envs/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,13 @@ def _generate_default_enterprise_api_url(settings):
if settings.LMS_INTERNAL_ROOT_URL is not None:
default_enterprise_api_url = settings.LMS_INTERNAL_ROOT_URL + '/enterprise/api/v1/'
return default_enterprise_api_url

ENTERPRISE_API_URL = _generate_default_enterprise_api_url

def _generate_default_enterprise_consent_api_url(settings):
default_enterprise_consent_api_url = None
if settings.LMS_INTERNAL_ROOT_URL is not None:
default_enterprise_consent_api_url = settings.LMS_INTERNAL_ROOT_URL + '/consent/api/v1/'
ENTERPRISE_CONSENT_API_URL = lambda settings: _generate_default_enterprise_consent_api_url
ENTERPRISE_CONSENT_API_URL = _generate_default_enterprise_consent_api_url

# Note the order of this matters, don't sort this list.
derived(
Expand Down

0 comments on commit 47c7e52

Please sign in to comment.