mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 03:11:54 +00:00
soft_deactivation: Do not bother to fetch stream data as well.
This prefetch is unnecessary and makes this query load more data than needed. Existing tests verify that this does not add more queries.
This commit is contained in:
committed by
Tim Abbott
parent
2deec692f6
commit
ae7485a96e
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user