From 7ec6f5296e25a01320c590fc9823f520d3ef5eb9 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 14 May 2024 16:52:36 -0700 Subject: [PATCH] migrations: Fix buggy migration failing to advance. --- ...include_realm_default_subscriptions_for_existing_objects.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zerver/migrations/0522_set_include_realm_default_subscriptions_for_existing_objects.py b/zerver/migrations/0522_set_include_realm_default_subscriptions_for_existing_objects.py index 006be1bcac..d00519a783 100644 --- a/zerver/migrations/0522_set_include_realm_default_subscriptions_for_existing_objects.py +++ b/zerver/migrations/0522_set_include_realm_default_subscriptions_for_existing_objects.py @@ -62,6 +62,7 @@ def set_include_realm_default_subscriptions_for_existing_prereg_objects( PreregistrationUser.objects.filter( id__range=(lower_bound, upper_bound), include_realm_default_subscriptions=None ).update(include_realm_default_subscriptions=False) + lower_bound += BATCH_SIZE def set_include_realm_default_subscriptions_for_existing_multiuse_invites( @@ -89,6 +90,8 @@ def set_include_realm_default_subscriptions_for_existing_multiuse_invites( id__range=(lower_bound, upper_bound), include_realm_default_subscriptions=None ).update(include_realm_default_subscriptions=False) + lower_bound += BATCH_SIZE + class Migration(migrations.Migration): atomic = False