From 70e5541a1b94d22c3c2ca1c3bdd8cc3dd38477ac Mon Sep 17 00:00:00 2001 From: "Dave St.Germain" Date: Mon, 10 Dec 2018 14:31:56 -0500 Subject: [PATCH] Don't override the attempt_code --- edx_proctoring/api.py | 2 -- edx_proctoring/backends/rest.py | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/edx_proctoring/api.py b/edx_proctoring/api.py index dd8228c91a6..80617d67899 100644 --- a/edx_proctoring/api.py +++ b/edx_proctoring/api.py @@ -669,8 +669,6 @@ def create_exam_attempt(exam_id, user_id, taking_as_proctored=False): exam, context=context, ) - if external_id: - attempt_code = external_id attempt = ProctoredExamStudentAttempt.create_exam_attempt( exam_id, diff --git a/edx_proctoring/backends/rest.py b/edx_proctoring/backends/rest.py index 465cbdc544a..1d4b6f44759 100644 --- a/edx_proctoring/backends/rest.py +++ b/edx_proctoring/backends/rest.py @@ -157,6 +157,8 @@ def register_exam_attempt(self, exam, context): url = self.create_exam_attempt_url.format(exam_id=exam['external_id']) payload = context payload['status'] = 'created' + # attempt code isn't needed in this API + payload.pop('attempt_code', False) log.debug('Creating exam attempt for %r at %r', exam['external_id'], url) response = self.session.post(url, json=payload) response = response.json()