Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

calculate_first_visible_message_id: Use .iterator() when iterating all realms.

Alex Vandiverfc12f0b3f468
diff --git a/zilencer/management/commands/calculate_first_visible_message_id.py b/zilencer/management/commands/calculate_first_visible_message_id.py
index 470b6676c8a..1052ca5c7b4 100644
--- a/zilencer/management/commands/calculate_first_visible_message_id.py
+++ b/zilencer/management/commands/calculate_first_visible_message_id.py
@@ -29,7 +29,7 @@ class Command(ZulipBaseCommand):
target_realm = self.get_realm(options)
if target_realm is None:
- realms: Iterable[Realm] = Realm.objects.all()
+ realms: Iterable[Realm] = Realm.objects.all().iterator()
else:
realms = [target_realm]