stripe: Set discount to None for 0 discount.

This commit is contained in:
Aman Agrawal
2023-11-24 06:34:24 +00:00
committed by Tim Abbott
parent 6040ffb94b
commit 6ad9217fbf

View File

@@ -100,7 +100,7 @@ def format_money(cents: float) -> str:
def format_discount_percentage(discount: Optional[Decimal]) -> Optional[str]:
if type(discount) is not Decimal:
if type(discount) is not Decimal or discount == Decimal(0):
return None
# Even though it looks like /activity/support only finds integers valid,