You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by jo...@apache.org on 2023/07/28 20:54:29 UTC
[superset] branch master updated: fix(migration): Ensure cascadeParentIds key exists (#24831)
This is an automated email from the ASF dual-hosted git repository.
johnbodley 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 caffe3cb1f fix(migration): Ensure cascadeParentIds key exists (#24831)
caffe3cb1f is described below
commit caffe3cb1f971519d29268ad136bb07abe6b59f9
Author: John Bodley <45...@users.noreply.github.com>
AuthorDate: Fri Jul 28 13:54:18 2023 -0700
fix(migration): Ensure cascadeParentIds key exists (#24831)
---
...023-07-19_16-48_a23c6f8b1280_cleanup_erroneous_parent_filter_ids.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/superset/migrations/versions/2023-07-19_16-48_a23c6f8b1280_cleanup_erroneous_parent_filter_ids.py b/superset/migrations/versions/2023-07-19_16-48_a23c6f8b1280_cleanup_erroneous_parent_filter_ids.py
index 17ad592b22..f5bdb29a96 100644
--- a/superset/migrations/versions/2023-07-19_16-48_a23c6f8b1280_cleanup_erroneous_parent_filter_ids.py
+++ b/superset/migrations/versions/2023-07-19_16-48_a23c6f8b1280_cleanup_erroneous_parent_filter_ids.py
@@ -61,14 +61,13 @@ def upgrade():
filter_ids = {fltr["id"] for fltr in filters}
for fltr in filters:
- for parent_id in fltr["cascadeParentIds"][:]:
+ for parent_id in fltr.get("cascadeParentIds", [])[:]:
if parent_id not in filter_ids:
fltr["cascadeParentIds"].remove(parent_id)
updated = True
if updated:
dashboard.json_metadata = json.dumps(json_metadata)
-
except Exception:
logging.exception(
f"Unable to parse JSON metadata for dashboard {dashboard.id}"