Skip to content

Commit 0889524

Browse files
pwnage101claude
andcommitted
feat: remove enterprise and consent from OPTIONAL_APPS
- Remove ('enterprise', None) and ('consent', None) from OPTIONAL_APPS in openedx/envs/common.py. Now that edx-enterprise registers enterprise and consent as openedx LMS plugins via entry_points, get_plugin_apps() adds them to INSTALLED_APPS automatically. Keeping them in OPTIONAL_APPS would cause duplicate app label errors. - Update enterprise_enabled() in enterprise_support/api.py to use django_apps.is_installed('enterprise') instead of the raw string check 'enterprise' in settings.INSTALLED_APPS. The new plugin entry_point-based registration uses 'enterprise.apps.EnterpriseConfig' (not 'enterprise') in INSTALLED_APPS, so the raw string check no longer works. ENT-11663 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3453e7d commit 0889524

7 files changed

Lines changed: 9 additions & 9 deletions

File tree

openedx/envs/common.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -774,9 +774,8 @@ def make_mako_module_dir(settings):
774774
# edxval
775775
('edxval', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'),
776776

777-
# Enterprise Apps (http://github.com/openedx/edx-enterprise)
778-
('enterprise', None),
779-
('consent', None),
777+
# Deprecated apps from the edx-enterprise package. We're working on removing these as part of
778+
# pluginifying edx-enterprise (<https://discuss.openedx.org/t/18316>)
780779
('integrated_channels.integrated_channel', None),
781780
('integrated_channels.degreed', None),
782781
('integrated_channels.degreed2', None),

openedx/features/enterprise_support/api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import requests
1111
from crum import get_current_request
12+
from django.apps import apps as django_apps
1213
from django.conf import settings
1314
from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user
1415
from django.contrib.sites.models import Site
@@ -373,7 +374,7 @@ def enterprise_enabled():
373374
"""
374375
Determines whether the Enterprise app is installed
375376
"""
376-
return 'enterprise' in settings.INSTALLED_APPS and settings.FEATURES.get('ENABLE_ENTERPRISE_INTEGRATION', False)
377+
return django_apps.is_installed('enterprise') and settings.FEATURES.get('ENABLE_ENTERPRISE_INTEGRATION', False)
377378

378379

379380
def enterprise_is_enabled(otherwise=None):

requirements/constraints.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ django-stubs<6
4444
# The team that owns this package will manually bump this package rather than having it pulled in automatically.
4545
# This is to allow them to better control its deployment and to do it in a process that works better
4646
# for them.
47-
edx-enterprise==6.7.0
47+
edx-enterprise==6.8.0
4848

4949
# Date: 2023-07-26
5050
# Our legacy Sass code is incompatible with anything except this ancient libsass version.

requirements/edx/base.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ edx-drf-extensions==10.6.0
478478
# enterprise-integrated-channels
479479
# openedx-authz
480480
# openedx-core
481-
edx-enterprise==6.7.0
481+
edx-enterprise==6.8.1
482482
# via
483483
# -c requirements/constraints.txt
484484
# -r requirements/edx/kernel.in

requirements/edx/development.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ edx-drf-extensions==10.6.0
758758
# enterprise-integrated-channels
759759
# openedx-authz
760760
# openedx-core
761-
edx-enterprise==6.7.0
761+
edx-enterprise==6.8.1
762762
# via
763763
# -c requirements/constraints.txt
764764
# -r requirements/edx/doc.txt

requirements/edx/doc.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ edx-drf-extensions==10.6.0
569569
# enterprise-integrated-channels
570570
# openedx-authz
571571
# openedx-core
572-
edx-enterprise==6.7.0
572+
edx-enterprise==6.8.1
573573
# via
574574
# -c requirements/constraints.txt
575575
# -r requirements/edx/base.txt

requirements/edx/testing.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ edx-drf-extensions==10.6.0
589589
# enterprise-integrated-channels
590590
# openedx-authz
591591
# openedx-core
592-
edx-enterprise==6.7.0
592+
edx-enterprise==6.8.1
593593
# via
594594
# -c requirements/constraints.txt
595595
# -r requirements/edx/base.txt

0 commit comments

Comments
 (0)