REV-2260: fix decimal display issue for enterprise learners

This commit is contained in:
Diane Kaplan
2021-06-22 09:19:27 -04:00
committed by GitHub
parent 4a91226672
commit 797e93e89e

View File

@@ -115,4 +115,11 @@ def get_course_final_price(user, sku, course_price):
user.username,
price_details.get('total_incl_tax')
)
return price_details.get('total_incl_tax', course_price)
result = price_details.get('total_incl_tax', course_price)
# When ecommerce price has zero cents, 'result' gets 149.0
# As per REV-2260: if zero cents, then only show dollars
if int(result) == result:
result = int(result)
return result