Commit f7be42a1 by aamir-khan Committed by Adam Palay

ECOM-3706: Restricted the enrollment in credit modes directly in upgradeAndVerified flow

parent 52b39ca4
......@@ -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.
......
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