From f7be42a1353b3d04f5cabe794885faccc71a1f75 Mon Sep 17 00:00:00 2001 From: aamir-khan Date: Sat, 13 Feb 2016 02:35:14 +0500 Subject: [PATCH] ECOM-3706: Restricted the enrollment in credit modes directly in upgradeAndVerified flow --- lms/djangoapps/verify_student/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/verify_student/views.py b/lms/djangoapps/verify_student/views.py index cbaca23abe..431ba89b97 100644 --- a/lms/djangoapps/verify_student/views.py +++ b/lms/djangoapps/verify_student/views.py @@ -522,9 +522,9 @@ class PayAndVerifyView(View): if mode.min_price > 0 and not CourseMode.is_credit_mode(mode): return mode - # Otherwise, find the first expired mode + # Otherwise, find the first non credit expired paid mode for mode in all_modes[course_key]: - if mode.min_price > 0: + if mode.min_price > 0 and not CourseMode.is_credit_mode(mode): return mode # Otherwise, return None and so the view knows to respond with a 404.