migrations: Fix buggy migration failing to advance.

This commit is contained in:
Tim Abbott 2024-05-14 16:52:36 -07:00
parent f1063139f0
commit 7ec6f5296e
1 changed files with 3 additions and 0 deletions

View File

@ -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