You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/11/30 13:25:12 UTC

[GitHub] [incubator-superset] villebro commented on a change in pull request #11845: fix: dashboard iframe to markdown db migration

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org