From edd5ed205fc254d0c9c1325e4be903af0eb75e27 Mon Sep 17 00:00:00 2001 From: johanv26 Date: Fri, 19 Aug 2022 15:50:39 -0500 Subject: [PATCH] fix: lms installed apps without course_creators Due course_creators is an studio app, when lms use `eox_nelp` it bring an error. This avoid the following error ```RuntimeError: Model class cms.djangoapps.course_creators.models.CourseCreator doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS```. So you have to add this one in the `INSTALLED_APPS`. --- eox_nelp/settings/common.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eox_nelp/settings/common.py b/eox_nelp/settings/common.py index 6d970388..46312ff0 100644 --- a/eox_nelp/settings/common.py +++ b/eox_nelp/settings/common.py @@ -16,7 +16,7 @@ 'django_countries', ) EOX_AUDIT_MODEL_APP = 'eox_audit_model.apps.EoxAuditModelConfig' - +COURSE_CREATOR_APP = 'cms.djangoapps.course_creators' def plugin_settings(settings): """ @@ -26,3 +26,5 @@ def plugin_settings(settings): settings.EOX_NELP_COURSE_CREATORS_BACKEND = 'eox_nelp.edxapp_wrapper.backends.course_creators_l_v1' if find_spec('eox_audit_model') and EOX_AUDIT_MODEL_APP not in settings.INSTALLED_APPS: settings.INSTALLED_APPS.append(EOX_AUDIT_MODEL_APP) + if COURSE_CREATOR_APP not in settings.INSTALLED_APPS: + settings.INSTALLED_APPS.append(COURSE_CREATOR_APP)