Commit 507d7b1a by Awais

ECOM-528 refactor the code.

parent 866ddc22
......@@ -763,7 +763,8 @@ 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):
if not is_verified_mode:
if not has_payment_option:
return_val = True
else:
if enrollment.mode in ['audit', 'honor']:
......
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