Skip to content

fix: move audio description toggle to safe shared module#303

Open
viv-helix wants to merge 1 commit into
release-ulmofrom
fix/lib-import
Open

fix: move audio description toggle to safe shared module#303
viv-helix wants to merge 1 commit into
release-ulmofrom
fix/lib-import

Conversation

@viv-helix

Copy link
Copy Markdown
Member

Summary

Move the audio description feature toggle into a lightweight shared module to avoid import-time side effects during LMS initialization.

Problem

audio_description_enabled was being imported from cms.djangoapps.contentstore.toggles.

That module now imports search_api at module load time, which triggers early Django model initialization before apps/settings are fully ready. This caused LMS startup/runtime failures and exposed downstream initialization issues, including the ExtendedCasbinRule error.

The previous lazy import behavior was effectively masking these import-order dependencies.

Fix

  • Move:

    • ENABLE_AUDIO_DESCRIPTION
    • audio_description_enabled

    from:

    • cms.djangoapps.contentstore.toggles

    to:

    • openedx.core.djangoapps.video_config.toggles
  • Update LMS/CMS callers to import the toggle from the new shared module.

Result

The audio description toggle can now be safely imported from both LMS and CMS without pulling in search_api or triggering premature Django model loading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant