Commit 4ab204cc by Diana Huang

Only create a new photo verification if one doesn't already exist.

parent 70cdc9a7
......@@ -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', {})
......
Markdown is supported
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