Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

stripe: Set discount to None for 0 discount.

Aman Agrawal6ad9217fbf09
diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.py
index d2674e5a6fd..0c6e0aa7d5b 100644
--- a/corporate/lib/stripe.py
+++ b/corporate/lib/stripe.py
@@ -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,