mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
corporate: Fix 'renewal_amount' always a truthy value on billing page.
Earlier, the 'renewal_amount' context variable passed to the billing template was always a non-empty string which is a truthy value. The expected behavior is that 'renewal_amount' should be falsy value if the renewal_cents is 0. This commit fixes the incorrect behavior and returns None in this case.
This commit is contained in:
committed by
Tim Abbott
parent
55326f7000
commit
18d1924823
@@ -2275,7 +2275,7 @@ class BillingSession(ABC):
|
||||
"licenses_at_next_renewal": licenses_at_next_renewal,
|
||||
"seat_count": seat_count,
|
||||
"renewal_date": renewal_date,
|
||||
"renewal_amount": cents_to_dollar_string(renewal_cents),
|
||||
"renewal_amount": cents_to_dollar_string(renewal_cents) if renewal_cents != 0 else None,
|
||||
"payment_method": payment_method,
|
||||
"charge_automatically": charge_automatically,
|
||||
"stripe_email": stripe_email,
|
||||
|
||||
Reference in New Issue
Block a user