Skip to content

Commit

Permalink
Don't override the attempt_code
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave St.Germain committed Dec 10, 2018
1 parent 7fd2a01 commit 70e5541
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions edx_proctoring/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions edx_proctoring/backends/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 70e5541

Please sign in to comment.