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: Do not bother to fetch stream data as well.

Alex Vandiverae7485a96ebe
diff --git a/zerver/lib/soft_deactivation.py b/zerver/lib/soft_deactivation.py
index f6628ba1532..dfd9be2dd8b 100644
--- a/zerver/lib/soft_deactivation.py
+++ b/zerver/lib/soft_deactivation.py
@@ -176,8 +176,7 @@ def add_missing_messages(user_profile: UserProfile) -> None:
# meantime. Without that tiebreak, we could end up incorrectly
# processing the ordering of those two subscription changes.
subscription_logs = list(
- RealmAuditLog.objects.select_related("modified_stream")
- .filter(
+ RealmAuditLog.objects.filter(
modified_user=user_profile, modified_stream_id__in=stream_ids, event_type__in=events
)
.order_by("event_last_message_id", "id")