aminghadersohi commented on PR #40958: URL: https://github.com/apache/superset/pull/40958#issuecomment-4811202254
Addressed review comment (CodeAnt, comment 3482429213): Fixed the `positions`/`set_dash_metadata` slices-overwrite bug in commit 283fb13393. The `positions` key is no longer injected into the json_metadata blob passed to `UpdateDashboardCommand`. Instead, `_clean_json_metadata` runs against the original metadata in-place, and the cleaned result is written directly to `updated_dashboard.json_metadata` + `db.session.commit()` after the re-fetch — bypassing `DashboardDAO.set_dash_metadata`'s positions branch which would have overwritten `dashboard.slices` from layout data and silently dropped charts present in the slices relationship but absent from `position_json`. The test now asserts `"json_metadata" not in update_data` and verifies the cleaned metadata on `updated_dashboard.json_metadata` directly. -- 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]
