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.

soft_deactivation: Only fetch necessary columns.

Alex Vandivera56da4be7646
diff --git a/zerver/lib/soft_deactivation.py b/zerver/lib/soft_deactivation.py
index dfd9be2dd8b..e55566da9b3 100644
--- a/zerver/lib/soft_deactivation.py
+++ b/zerver/lib/soft_deactivation.py
@@ -180,6 +180,7 @@ def add_missing_messages(user_profile: UserProfile) -> None:
modified_user=user_profile, modified_stream_id__in=stream_ids, event_type__in=events
)
.order_by("event_last_message_id", "id")
+ .only("id", "event_type", "modified_stream_id", "event_last_message_id")
)
all_stream_subscription_logs: DefaultDict[int, List[RealmAuditLog]] = defaultdict(list)