diff --git a/superset/charts/schemas.py b/superset/charts/schemas.py index 1a8e8d728..5e76c8ee3 100644 --- a/superset/charts/schemas.py +++ b/superset/charts/schemas.py @@ -1368,6 +1368,9 @@ class GetFavStarIdsSchema(Schema): class ImportV1ChartSchema(Schema): slice_name = fields.String(required=True) + description = fields.String(allow_none=True) + certified_by = fields.String(allow_none=True) + certification_details = fields.String(allow_none=True) viz_type = fields.String(required=True) params = fields.Dict() query_context = fields.String(allow_none=True, validate=utils.validate_json) diff --git a/superset/models/slice.py b/superset/models/slice.py index e12f9a742..332d51d1a 100644 --- a/superset/models/slice.py +++ b/superset/models/slice.py @@ -110,6 +110,9 @@ class Slice( # pylint: disable=too-many-public-methods export_fields = [ "slice_name", + "description", + "certified_by", + "certification_details", "datasource_type", "datasource_name", "viz_type", diff --git a/tests/integration_tests/charts/commands_tests.py b/tests/integration_tests/charts/commands_tests.py index 214b7cbfe..7e3991f37 100644 --- a/tests/integration_tests/charts/commands_tests.py +++ b/tests/integration_tests/charts/commands_tests.py @@ -72,6 +72,9 @@ class TestExportChartsCommand(SupersetTestCase): assert metadata == { "slice_name": "Energy Sankey", + "description": None, + "certified_by": None, + "certification_details": None, "viz_type": "sankey", "params": { "collapsed_fieldsets": "", @@ -110,6 +113,9 @@ class TestExportChartsCommand(SupersetTestCase): assert metadata == { "slice_name": "Heatmap", + "description": None, + "certified_by": None, + "certification_details": None, "viz_type": "heatmap", "params": { "all_columns_x": "source", @@ -168,6 +174,9 @@ class TestExportChartsCommand(SupersetTestCase): ) assert list(metadata.keys()) == [ "slice_name", + "description", + "certified_by", + "certification_details", "viz_type", "params", "cache_timeout",