Open
Description
Bug description
We are trying to fetch chart data using /api/v1/chart/2910/data API, but we are getting 400 response with message "Chart has no query context saved. Please save the chart again".
WorkAround: When we try hitting this API after manually opening the chart again, the API is able to fetch data. (We have around 100 charts because of which this workaround is not a feasible option for us)
P.S. We are using zip file to import dashboards
Screenshots/recordings
Query Context is null, when hitting API: http://localhost:8088/api/v1/chart/2030
Message after hitting API: http://localhost:8088/api/v1/chart/2030/data/
After Opening the Chart
Superset version
4.0.2
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
- I have searched Superset docs and Slack and didn't find a solution to my problem.
- I have searched the GitHub issue tracker and didn't find a similar bug report.
- I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.