Skip to content

Commit

Permalink
fix: import dashboard w/o metadata (apache#16360)
Browse files Browse the repository at this point in the history
  • Loading branch information
betodealmeida authored and Emmanuel Bavoux committed Nov 14, 2021
1 parent 0d8faee commit c01de20
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion superset/dashboards/commands/importers/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ def _import(
for file_name, config in configs.items():
if file_name.startswith("dashboards/"):
chart_uuids.update(find_chart_uuids(config["position"]))
dataset_uuids.update(find_native_filter_datasets(config["metadata"]))
dataset_uuids.update(
find_native_filter_datasets(config.get("metadata", {}))
)

# discover datasets associated with charts
for file_name, config in configs.items():
Expand Down

0 comments on commit c01de20

Please sign in to comment.