mirror of
https://github.com/apache/superset.git
synced 2026-05-24 09:15:19 +00:00
When a saved query contains a Jinja macro such as `{{ dataset(id) }}` and the
referenced dataset is later deleted, `process_jinja_sql` raises
`DatasetNotFoundError` while computing the `sql_tables` field. That exception
was not caught by `SqlTablesMixin.sql_tables`, so the entire saved-query list
endpoint failed with "Dataset ID not found", hiding every saved query from
the user and preventing them from deleting the broken one (#32771).
Treat any `SupersetException` raised during table extraction the same way as
existing parse/security/template errors: log a warning and return an empty
list so the rest of the row can still be serialized.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>