fix(pvt2): migrations from legacy pivot table error when form_data have pieces of pvt2 (#24710)
This commit is contained in:
parent
91e6f5cb9f
commit
df106aa708
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue