mikebridge commented on PR #44028:
URL: https://github.com/apache/superset/pull/44028#issuecomment-5684729269

   You're right, and thanks for catching it. The copy loop writes 
`old_to_new_slice_ids.get(old_id)` unconditionally at `daos/dashboard.py:713`, 
so a chart hard-deleted while it was a member — no row, no clone, no mapping 
entry — becomes `chartId: None`, and the new `_reject_malformed_chart_nodes` 
then refuses the copy at `:526`. Fixed in 3f1f30fed0 by reconciling the 
submitted positions against the original dashboard *before* cloning, while the 
old ids still identify their rows and no clone ids exist to confuse the 
existence lookup: the dangling slot becomes the same markdown placeholder the 
raw-layout path produces (node id, parents/children and geometry preserved), 
and the remap skips it because it no longer carries a chartId. The strict 
validation is unchanged — an originally malformed `chartId` still raises — and 
a soft-deleted, recoverable member is still not repaired away. Added a copy 
regression with a live chart plus a hard-deleted slot, asserting the clone is 
refere
 nced with its uuid, the placeholder keeps its geometry, no CHART node has a 
null id, membership is the clones only, and the source dashboard is left 
untouched; kept a negative test that a malformed id is still rejected.
   


-- 
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]

Reply via email to