mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-31 03:53:50 +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: | def extract_current_subscription(stripe_customer: stripe.Customer) -> Any: | ||||||
|     if not stripe_customer.subscriptions: |     if not stripe_customer.subscriptions: | ||||||
|         return None |         return None | ||||||
|     for stripe_subscription in stripe_customer.subscriptions.data: |     for stripe_subscription in stripe_customer.subscriptions: | ||||||
|         if stripe_subscription.status != "canceled": |         if stripe_subscription.status != "canceled": | ||||||
|             return stripe_subscription |             return stripe_subscription | ||||||
|     return None |     return None | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user