Skip to content

Commit

Permalink
fix: handle missing discussion settings when importing old courses
Browse files Browse the repository at this point in the history
  • Loading branch information
Agrendalath committed Feb 3, 2025
1 parent be897f0 commit 7a8199e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cms/djangoapps/contentstore/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,8 @@ def sync_discussion_settings(course_key, user):

if (
ENABLE_NEW_STRUCTURE_DISCUSSIONS.is_enabled()
and not course.discussions_settings['provider_type'] == Provider.OPEN_EDX
and not course.discussions_settings['provider'] == Provider.OPEN_EDX
and not course.discussions_settings.get('provider_type') == Provider.OPEN_EDX
and not course.discussions_settings.get('provider') == Provider.OPEN_EDX
):
LOGGER.info(f"New structure is enabled, also updating {course_key} to use new provider")
course.discussions_settings['enable_graded_units'] = False
Expand Down

0 comments on commit 7a8199e

Please sign in to comment.