You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by dp...@apache.org on 2025/06/05 08:24:34 UTC
(superset) branch master updated: chore: simplify query cleanup using dict.pop instead of suppressing exception (#33661)
This is an automated email from the ASF dual-hosted git repository.
dpgaspar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new a6af4f4d7a chore: simplify query cleanup using dict.pop instead of suppressing exception (#33661)
a6af4f4d7a is described below
commit a6af4f4d7ad8792a0bc136ef613fe5e74d477520
Author: Daniel Vaz Gaspar <da...@gmail.com>
AuthorDate: Thu Jun 5 09:24:28 2025 +0100
chore: simplify query cleanup using dict.pop instead of suppressing exception (#33661)
---
superset/charts/data/api.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/superset/charts/data/api.py b/superset/charts/data/api.py
index e8080c646f..efae7de831 100644
--- a/superset/charts/data/api.py
+++ b/superset/charts/data/api.py
@@ -397,8 +397,7 @@ class ChartDataRestApi(ChartRestApi):
queries = result["queries"]
if security_manager.is_guest_user():
for query in queries:
- with contextlib.suppress(KeyError):
- del query["query"]
+ query.pop("query", None)
with event_logger.log_context(f"{self.__class__.__name__}.json_dumps"):
response_data = json.dumps(
{"result": queries},