perf(export): export generates unnecessary files content (#26765)

This commit is contained in:
Stepan
2024-02-22 02:28:38 +03:00
committed by GitHub
parent 744f68d637
commit 2e4f6d3f38
23 changed files with 279 additions and 176 deletions

View File

@@ -80,7 +80,7 @@ class ImportExportRestApi(BaseSupersetApi):
with ZipFile(buf, "w") as bundle:
for file_name, file_content in ExportAssetsCommand().run():
with bundle.open(f"{root}/{file_name}", "w") as fp:
fp.write(file_content.encode())
fp.write(file_content().encode())
buf.seek(0)
response = send_file(