Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dashboard): import handle missing excluded charts #19088

Merged
merged 1 commit into from
Mar 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion superset/dashboards/commands/importers/v1/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def update_id_refs( # pylint: disable=too-many-locals
scope_excluded = native_filter.get("scope", {}).get("excluded", [])
if scope_excluded:
native_filter["scope"]["excluded"] = [
id_map[old_id] for old_id in scope_excluded
id_map[old_id] for old_id in scope_excluded if old_id in id_map
]

return fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def test_update_native_filter_config_scope_excluded(app_context: None):
},
},
"metadata": {
"native_filter_configuration": [{"scope": {"excluded": [101, 102]}}],
"native_filter_configuration": [{"scope": {"excluded": [101, 102, 103]}}],
},
}
chart_ids = {"uuid1": 1, "uuid2": 2}
Expand Down