Skip to content
Snippets Groups Projects
Commit e5f298e1 authored by Michael Roytman's avatar Michael Roytman
Browse files

Change validation code to use the value of the proctoring_provider model when...

Change validation code to use the value of the proctoring_provider model when making a comparison instead of the entire model. Otherwise, the condition 'current_provider != requested_provider' always resolves to True.
parent aa3ae13a
Branches
Tags
No related merge requests found
......@@ -249,7 +249,7 @@ class CourseMetadata(object):
errors.append({'message': text_type(err), 'model': model})
# Disallow updates to the proctoring provider after course start
proctoring_provider_model = filtered_dict.get('proctoring_provider')
proctoring_provider_model = filtered_dict.get('proctoring_provider', {})
# If the user is not edX staff, the user has requested a change to the proctoring_provider
# Advanced Setting, and and it is after course start, prevent the user from changing the
......@@ -257,7 +257,7 @@ class CourseMetadata(object):
if (
not user.is_staff and
cls._has_requested_proctoring_provider_changed(
descriptor.proctoring_provider, proctoring_provider_model
descriptor.proctoring_provider, proctoring_provider_model.get('value')
) and
datetime.now(pytz.UTC) > descriptor.start
):
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment