mikebridge commented on code in PR #45528:
URL: https://github.com/apache/superset/pull/45528#discussion_r4331234897
##########
superset/daos/dashboard.py:
##########
@@ -969,9 +969,15 @@ def copy_dashboard(
# the raw-layout markdown placeholder while preserving geometry;
# the remap below skips that slot because it has no chartId.
reconcile_position_json(metadata.get("positions"),
original_dash.id)
+ chart_id: int | None
+ layout_chart_ids: set[int] = {
+ chart_id
+ for node in metadata["positions"].values()
+ if (chart_id := _layout_chart_id(node)) is not None
+ }
# Duplicating slices as well, mapping old ids to new ones
for slc in original_dash.slices:
- if slc.id in archived_ids:
+ if slc.id in archived_ids or slc.id not in layout_chart_ids:
Review Comment:
Thanks, Matt. Confirmed: the fallback keeps omitted IDs in the source
namespace on this branch. The stacked #45530 prunes chart configuration and
filter scopes to retained chart IDs in 46b2623bf2, so I'll keep that cleanup
there rather than expand this clone-count fix.
##########
superset/daos/dashboard.py:
##########
@@ -969,9 +969,15 @@ def copy_dashboard(
# the raw-layout markdown placeholder while preserving geometry;
# the remap below skips that slot because it has no chartId.
reconcile_position_json(metadata.get("positions"),
original_dash.id)
+ chart_id: int | None
+ layout_chart_ids: set[int] = {
Review Comment:
Thanks, confirmed these are pre-existing. The stacked #45530 remaps and
prunes expanded charts and refresh exemptions in 46b2623bf2. Legacy
default_filters still needs a separate follow-up; I'm leaving that behavior out
of this fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]