mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
billing: Don't use data attribute for iterating through subscriptions.
Iterating through data attribute is same as iterating through subscriptions.
This commit is contained in:
@@ -108,7 +108,7 @@ def get_upcoming_invoice(stripe_customer_id: str) -> stripe.Invoice:
|
||||
def extract_current_subscription(stripe_customer: stripe.Customer) -> Any:
|
||||
if not stripe_customer.subscriptions:
|
||||
return None
|
||||
for stripe_subscription in stripe_customer.subscriptions.data:
|
||||
for stripe_subscription in stripe_customer.subscriptions:
|
||||
if stripe_subscription.status != "canceled":
|
||||
return stripe_subscription
|
||||
return None
|
||||
|
Reference in New Issue
Block a user