villebro commented on a change in pull request #11845:
URL:
https://github.com/apache/incubator-superset/pull/11845#discussion_r532593068
##########
File path:
superset/migrations/versions/978245563a02_migrate_iframe_to_dash_markdown.py
##########
@@ -154,13 +155,13 @@ def upgrade():
children.remove(key)
children.append(markdown["id"])
- dashboard.position_json = json.dumps(
- position_dict,
- indent=None,
- separators=(",", ":"),
- sort_keys=True,
- )
- session.merge(dashboard)
+ if keys_to_remove:
+ for key_to_remove in keys_to_remove:
+ position_dict.pop(key_to_remove)
Review comment:
nit: as we're not doing anything with the key, perhaps just do
```suggestion
del position_dict[key_to_remove]
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]