mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
export-search: Limit to only the fields we need.
(cherry picked from commit e9c6856d02)
This commit is contained in:
committed by
Tim Abbott
parent
270a19984a
commit
a9417eb4fe
@@ -204,6 +204,17 @@ This is most often used for legal compliance.
|
||||
messages_query = (
|
||||
Message.objects.filter(limits, realm=realm)
|
||||
.select_related("sender")
|
||||
.only(
|
||||
"id",
|
||||
"date_sent",
|
||||
"sender__full_name",
|
||||
"sender__delivery_email",
|
||||
"recipient_id",
|
||||
"subject",
|
||||
"content",
|
||||
"edit_history",
|
||||
"has_attachment",
|
||||
)
|
||||
.order_by("date_sent")
|
||||
)
|
||||
print(f"Exporting {len(messages_query)} messages...")
|
||||
|
||||
Reference in New Issue
Block a user