Skip to content

Commit

Permalink
fix: missing discussions provider
Browse files Browse the repository at this point in the history
  • Loading branch information
0x29a committed Oct 25, 2024
1 parent b75c2db commit 0e4a74a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions cms/djangoapps/contentstore/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,7 @@ def update_course_discussions_settings(course):
"""
provider = DiscussionsConfiguration.get(context_key=course.id).provider_type
store = modulestore()
course.discussions_settings['provider'] = provider
course.discussions_settings['provider_type'] = provider
store.update_item(course, course.published_by)

Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/discussions/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def update_unit_discussion_state_from_discussion_blocks(course_key: CourseKey, u
"""
store = modulestore()
course = store.get_course(course_key)
provider = course.discussions_settings.get('provider', None)
provider = course.discussions_settings.get('provider', None) or course.discussions_settings.get('provider_type', None)
# Only migrate to the new discussion provider if the current provider is the legacy provider.
log.info(f"Current provider for {course_key} is {provider}")
if provider is not None and provider != Provider.LEGACY and not force:
Expand Down

0 comments on commit 0e4a74a

Please sign in to comment.