fix: discussion configuration not saved to course for new provider (#29863)

This fixes an issue where updating settings for the new discussion provider using the API doesn't save them to the course.
This commit is contained in:
Kshitij Sobti
2022-02-21 14:38:01 +00:00
committed by GitHub
parent 782ee338c9
commit ce456db4b7

View File

@@ -295,7 +295,7 @@ class DiscussionsConfigurationSerializer(serializers.ModelSerializer):
plugin_configuration = validated_data.pop('plugin_configuration', {})
updated_provider_type = validated_data.get('provider_type') or instance.provider_type
if updated_provider_type == Provider.LEGACY:
if updated_provider_type in [Provider.LEGACY, Provider.OPEN_EDX]:
legacy_settings = LegacySettingsSerializer(
self._get_course(),
context={