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.

update_subscriber_counts: Fix annotate usage.

Anders Kaseorg9ca788cbbc85
diff --git a/zerver/management/commands/update_subscriber_counts.py b/zerver/management/commands/update_subscriber_counts.py
index 6bd3518eee5..03968ab1dc0 100644
--- a/zerver/management/commands/update_subscriber_counts.py
+++ b/zerver/management/commands/update_subscriber_counts.py
@@ -88,7 +88,7 @@ accurate; this command is run as a daily cron job to ensure the number is accura
changed_subs.distinct("modified_stream_id")
.order_by("modified_stream_id")
.annotate(stream_id=F("modified_stream_id"))
- .union(streams_from_users.annotate(stream_id="id"))
+ .union(streams_from_users.annotate(stream_id=F("id")))
.values_list("stream_id", flat=True)
)
elif realm := self.get_realm(options):