Skip to content

Commit

Permalink
fix: squash: put back DEFAULT_ENTERPRISE_
Browse files Browse the repository at this point in the history
  • Loading branch information
kdmccormick committed Feb 3, 2025
1 parent 32a84c7 commit 82a57f3
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions lms/envs/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,19 +179,21 @@ def get_env_setting(setting):
# the service, and override the default parameters which are defined in common.py


def _generate_default_enterprise_api_url(settings):
default_enterprise_api_url = None
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 = Derived(_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 = Derived(_generate_default_enterprise_consent_api_url)
DEFAULT_ENTERPRISE_API_URL = Derived(
lambda settings: (
None if settings.LMS_INTERNAL_ROOT_URL is None
else settings.LMS_INTERNAL_ROOT_URL + '/enterprise/api/v1/'
)
)
ENTERPRISE_API_URL = DEFAULT_ENTERPRISE_API_URL

DEFAULT_ENTERPRISE_CONSENT_API_URL = Derived(
lambda settings: (
None if settings.LMS_INTERNAL_ROOT_URL is None
else settings.LMS_INTERNAL_ROOT_URL + '/consent/api/v1/'
)
)
ENTERPRISE_CONSENT_API_URL = DEFAULT_ENTERPRISE_CONSENT_API_URL


#######################################################################################################################
Expand Down

0 comments on commit 82a57f3

Please sign in to comment.