From 4ab204cce715b8849527047bff18a94d67999ada Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Thu, 5 Sep 2013 08:50:54 -0400 Subject: [PATCH] Only create a new photo verification if one doesn't already exist. --- lms/djangoapps/verify_student/views.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lms/djangoapps/verify_student/views.py b/lms/djangoapps/verify_student/views.py index a8e6304fb2..1c66aa2bed 100644 --- a/lms/djangoapps/verify_student/views.py +++ b/lms/djangoapps/verify_student/views.py @@ -101,9 +101,10 @@ def create_order(request): """ Submit PhotoVerification and create a new Order for this verified cert """ - attempt = SoftwareSecurePhotoVerification(user=request.user) - attempt.status = "ready" - attempt.save() + if not SoftwareSecurePhotoVerification.user_has_valid_or_pending(request.user): + attempt = SoftwareSecurePhotoVerification(user=request.user) + attempt.status = "ready" + attempt.save() course_id = request.POST['course_id'] donation_for_course = request.session.get('donation_for_course', {})