Skip to content

Commit 9e57dc8

Browse files
pwnage101claude
andcommitted
feat: remove enterprise and consent from OPTIONAL_APPS
- Remove ('enterprise', None) and ('consent', None) from OPTIONAL_APPS in {lms,cms}/envs/common.py. Now that edx-enterprise registers enterprise and consent as openedx 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 559a63b commit 9e57dc8

8 files changed

Lines changed: 11 additions & 12 deletions

File tree

cms/envs/common.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,9 +1300,8 @@
13001300
# edxval
13011301
('edxval', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'),
13021302

1303-
# Enterprise App (http://github.com/openedx/edx-enterprise)
1304-
('enterprise', None),
1305-
('consent', None),
1303+
# Deprecated apps from the edx-enterprise package. We're working on removing these as part of
1304+
# pluginifying edx-enterprise (<https://discuss.openedx.org/t/18316>)
13061305
('integrated_channels.integrated_channel', None),
13071306
('integrated_channels.degreed', None),
13081307
('integrated_channels.degreed2', None),

lms/envs/common.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2678,9 +2678,8 @@
26782678
# edxval
26792679
('edxval', 'openedx.core.djangoapps.content.course_overviews.apps.CourseOverviewsConfig'),
26802680

2681-
# Enterprise Apps (http://github.com/openedx/edx-enterprise)
2682-
('enterprise', None),
2683-
('consent', None),
2681+
# Deprecated apps from the edx-enterprise package. We're working on removing these as part of
2682+
# pluginifying edx-enterprise (<https://discuss.openedx.org/t/18316>)
26842683
('integrated_channels.integrated_channel', None),
26852684
('integrated_channels.degreed', None),
26862685
('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
@@ -383,7 +384,7 @@ def enterprise_enabled():
383384
"""
384385
Determines whether the Enterprise app is installed
385386
"""
386-
return 'enterprise' in settings.INSTALLED_APPS and settings.FEATURES.get('ENABLE_ENTERPRISE_INTEGRATION', False)
387+
return django_apps.is_installed('enterprise') and settings.FEATURES.get('ENABLE_ENTERPRISE_INTEGRATION', False)
387388

388389

389390
def enterprise_is_enabled(otherwise=None):

requirements/constraints.txt

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

4747
# Date: 2023-07-26
4848
# 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
@@ -473,7 +473,7 @@ edx-drf-extensions==10.6.0
473473
# edxval
474474
# enterprise-integrated-channels
475475
# openedx-learning
476-
edx-enterprise==6.7.0
476+
edx-enterprise==6.8.1
477477
# via
478478
# -c requirements/constraints.txt
479479
# -r requirements/edx/kernel.in

requirements/edx/development.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ edx-drf-extensions==10.6.0
747747
# edxval
748748
# enterprise-integrated-channels
749749
# openedx-learning
750-
edx-enterprise==6.7.0
750+
edx-enterprise==6.8.1
751751
# via
752752
# -c requirements/constraints.txt
753753
# -r requirements/edx/doc.txt

requirements/edx/doc.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ edx-drf-extensions==10.6.0
557557
# edxval
558558
# enterprise-integrated-channels
559559
# openedx-learning
560-
edx-enterprise==6.7.0
560+
edx-enterprise==6.8.1
561561
# via
562562
# -c requirements/constraints.txt
563563
# -r requirements/edx/base.txt

requirements/edx/testing.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ edx-drf-extensions==10.6.0
578578
# edxval
579579
# enterprise-integrated-channels
580580
# openedx-learning
581-
edx-enterprise==6.7.0
581+
edx-enterprise==6.8.1
582582
# via
583583
# -c requirements/constraints.txt
584584
# -r requirements/edx/base.txt

0 commit comments

Comments
 (0)