Compare commits

...

2 Commits

Author SHA1 Message Date
Đỗ Trọng Hải
7a52c89a7f Merge branch 'master' into fix/export-api-returns-stale-resources 2026-07-18 13:10:46 +07:00
hainenber
c77c709b79 fix(backend): export API no longer returns stale resources
Signed-off-by: hainenber <dotronghai96@gmail.com>
2026-07-02 22:19:12 +07:00
6 changed files with 6 additions and 0 deletions

View File

@@ -1084,6 +1084,7 @@ class ChartRestApi(SoftDeleteApiMixin, BaseSupersetModelRestApi):
mimetype="application/zip",
as_attachment=True,
download_name=filename,
max_age=0,
)
if token := sanitize_cookie_token(request.args.get("token")):
response.set_cookie(token, "done", max_age=600)

View File

@@ -1478,6 +1478,7 @@ class DashboardRestApi(
mimetype="application/zip",
as_attachment=True,
download_name=filename,
max_age=0,
)
if token := sanitize_cookie_token(request.args.get("token")):
response.set_cookie(token, "done", max_age=600)

View File

@@ -747,6 +747,7 @@ class DatasetRestApi(SoftDeleteApiMixin, BaseSupersetModelRestApi):
mimetype="application/zip",
as_attachment=True,
download_name=filename,
max_age=0,
)
if token := sanitize_cookie_token(request.args.get("token")):
response.set_cookie(token, "done", max_age=600)

View File

@@ -89,6 +89,7 @@ class ImportExportRestApi(BaseSupersetApi):
mimetype="application/zip",
as_attachment=True,
download_name=filename,
max_age=0,
)
return response

View File

@@ -312,6 +312,7 @@ class SavedQueryRestApi(BaseSupersetModelRestApi):
mimetype="application/zip",
as_attachment=True,
download_name=filename,
max_age=0,
)
if token := sanitize_cookie_token(request.args.get("token")):
response.set_cookie(token, "done", max_age=600)

View File

@@ -489,6 +489,7 @@ class ThemeRestApi(BaseSupersetModelRestApi):
mimetype="application/zip",
as_attachment=True,
download_name=filename,
max_age=0,
)
if token := sanitize_cookie_token(request.args.get("token")):
response.set_cookie(token, "done", max_age=600)