From ee35ae6a5971d53cdfcf3f6e145a705ff2af5288 Mon Sep 17 00:00:00 2001 From: Ahtisham Shahid Date: Mon, 28 Nov 2022 16:03:01 +0500 Subject: [PATCH] fix: allow user to save/update custom email (#31337) --- openedx/core/djangoapps/course_live/providers.py | 3 +++ openedx/core/djangoapps/course_live/serializers.py | 7 +------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/openedx/core/djangoapps/course_live/providers.py b/openedx/core/djangoapps/course_live/providers.py index 933321dc1e..1d6b1e808e 100644 --- a/openedx/core/djangoapps/course_live/providers.py +++ b/openedx/core/djangoapps/course_live/providers.py @@ -87,6 +87,9 @@ class Zoom(LiveProvider): """ id = 'zoom' name = 'Zoom LTI PRO' + additional_parameters = [ + 'custom_instructor_email' + ] @property def is_enabled(self): diff --git a/openedx/core/djangoapps/course_live/serializers.py b/openedx/core/djangoapps/course_live/serializers.py index 486f9c8afb..0d05049c71 100644 --- a/openedx/core/djangoapps/course_live/serializers.py +++ b/openedx/core/djangoapps/course_live/serializers.py @@ -44,12 +44,7 @@ class LtiSerializer(serializers.ModelSerializer): validate_email(custom_instructor_email) except ValidationError as error: raise serializers.ValidationError(f'{custom_instructor_email} is not valid email address') from error - return value - - if not requires_email: - return value - - raise serializers.ValidationError('custom_instructor_email is required value in additional_parameters') + return value def create(self, validated_data): lti_config = validated_data.pop('lti_config', None)