Commit b46ca2d1 by Awais Committed by Zia Fazal

ECOM-528 refactor the code.

parent 60cd5439
......@@ -764,8 +764,9 @@ def _allow_donation(course_modes, course_id, enrollment):
has_payment_option = CourseMode.has_payment_options(course_id)
return_val = False
if donations_enabled:
if not (is_verified_mode and has_payment_option):
return_val = True
if not is_verified_mode:
if not has_payment_option:
return_val = True
else:
if enrollment.mode in ['audit', 'honor']:
return_val = True
......
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