diff --git a/superset/views/core.py b/superset/views/core.py index 65922b72dcae..1c0b7bb688ab 100755 --- a/superset/views/core.py +++ b/superset/views/core.py @@ -1257,7 +1257,7 @@ def copy_dash(self, dashboard_id): self._set_dash_metadata(dash, data) session.add(dash) session.commit() - dash_json = dash.json_data + dash_json = json.dumps(dash.data) session.close() return json_success(dash_json) diff --git a/tests/core_tests.py b/tests/core_tests.py index d18f2d93900c..f9e6c8a964c4 100644 --- a/tests/core_tests.py +++ b/tests/core_tests.py @@ -396,7 +396,7 @@ def test_copy_dash(self, username='admin'): self.client.post(url, data=dict(data=json.dumps(data))) dash = db.session.query(models.Dashboard).filter_by( id=dash_id).first() - orig_json_data = json.loads(dash.json_data) + orig_json_data = dash.data # Verify that copy matches original url = '/superset/copy_dash/{}/'.format(dash_id)