mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix(pvt2): migrations from legacy pivot table error when form_data have pieces of pvt2 (#24710)
This commit is contained in:
@@ -64,6 +64,12 @@ class MigrateViz:
|
||||
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 source_key, target_key in self.rename_keys.items():
|
||||
if source_key in self.data and target_key in self.data:
|
||||
self.data.pop(target_key)
|
||||
|
||||
rv_data = {}
|
||||
for key, value in self.data.items():
|
||||
if key in self.rename_keys and self.rename_keys[key] in rv_data:
|
||||
|
||||
Reference in New Issue
Block a user