mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
export: Filter Attachment objects by realm.
This commit is contained in:
parent
cecfaa7761
commit
7ec6a394fe
@ -374,7 +374,7 @@ def export_uploads_local_helper(realm, output_dir, local_dir):
|
||||
|
||||
count = 0
|
||||
records = []
|
||||
for attachment in Attachment.objects.all():
|
||||
for attachment in Attachment.objects.filter(realm_id=realm.id):
|
||||
local_path = os.path.join(local_dir, attachment.path_id)
|
||||
output_path = os.path.join(output_dir, attachment.path_id)
|
||||
mkdir_p(os.path.dirname(output_path))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user