michael-s-molina commented on code in PR #24710:
URL: https://github.com/apache/superset/pull/24710#discussion_r1265601017
##########
superset/migrations/shared/migrate_viz/base.py:
##########
@@ -64,6 +64,12 @@ def _migrate(self) -> None:
if "viz_type" in self.data:
self.data["viz_type"] = self.target_viz_type
+ # Sometimes visualizations have same keys in the source form_data and
rename_keys
+ # We need to remove them from data to allow the migration to work
properly with rename_keys
+ for key in self.rename_keys.values():
Review Comment:
I'm worried we might have keys that belong to the new version but not a
corresponding legacy key. In that case, removing the keys will make us lose
information. Taking a Pivot Table as example, we might have `series_limit`
(new) but no `row_limit` (legacy). For safety, could only remove keys if its
legacy counterpart also exists?
--
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]