Skip to content

Commit

Permalink
fix: lms installed apps without course_creators
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
johanseto committed Aug 19, 2022
1 parent 2ddf854 commit edd5ed2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eox_nelp/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand All @@ -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)

0 comments on commit edd5ed2

Please sign in to comment.