Skip to content

Commit d963f58

Browse files
refactor: register unit models in app setup
1 parent 23af217 commit d963f58

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

openedx_learning/apps/authoring/containers/apps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ContainersConfig(AppConfig):
1818

1919
def ready(self):
2020
"""
21-
Register Component and ComponentVersion.
21+
Register ContainerEntity and ContainerEntityVersion.
2222
"""
2323
from ..publishing.api import register_content_models # pylint: disable=import-outside-toplevel
2424
from .models import ContainerEntity, ContainerEntityVersion # pylint: disable=import-outside-toplevel

openedx_learning/apps/authoring/units/apps.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,12 @@ class UnitsConfig(AppConfig):
1414
verbose_name = "Learning Core > Authoring > Units"
1515
default_auto_field = "django.db.models.BigAutoField"
1616
label = "oel_units"
17+
18+
def ready(self):
19+
"""
20+
Register Unit and UnitVersion.
21+
"""
22+
from ..publishing.api import register_content_models # pylint: disable=import-outside-toplevel
23+
from .models import Unit, UnitVersion # pylint: disable=import-outside-toplevel
24+
25+
register_content_models(Unit, UnitVersion)

0 commit comments

Comments
 (0)