mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 16:14:02 +00:00
stripe: Order downgrade_small_realms_behind_on_payments_as_needed query.
Fixes nondeterminism that broke test_downgrade_small_realms_behind_on_payments_as_needed. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
9bb082a315
commit
f04f3bcbfc
@@ -5702,7 +5702,9 @@ def customer_has_last_n_invoices_open(customer: Customer, n: int) -> bool:
|
|||||||
|
|
||||||
|
|
||||||
def downgrade_small_realms_behind_on_payments_as_needed() -> None:
|
def downgrade_small_realms_behind_on_payments_as_needed() -> None:
|
||||||
customers = Customer.objects.all().exclude(stripe_customer_id=None).exclude(realm=None)
|
customers = (
|
||||||
|
Customer.objects.all().exclude(stripe_customer_id=None).exclude(realm=None).order_by("id")
|
||||||
|
)
|
||||||
for customer in customers:
|
for customer in customers:
|
||||||
realm = customer.realm
|
realm = customer.realm
|
||||||
assert realm is not None
|
assert realm is not None
|
||||||
|
Reference in New Issue
Block a user