Skip to content

Commit

Permalink
fix(import): error with disable_data_preview field (#20932)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomedina248 authored Aug 2, 2022
1 parent dd353ca commit 6ce027d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions superset/databases/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ def fix_schemas_allowed_for_csv_upload(
cost_estimate_enabled = fields.Boolean()
allows_virtual_table_explore = fields.Boolean(required=False)
cancel_query_on_windows_unload = fields.Boolean(required=False)
disable_data_preview = fields.Boolean(required=False)


class ImportV1DatabaseSchema(Schema):
Expand Down
6 changes: 3 additions & 3 deletions superset/datasets/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class ImportV1ColumnSchema(Schema):
@pre_load
def fix_extra(self, data: Dict[str, Any], **kwargs: Any) -> Dict[str, Any]:
"""
Fix for extra initially beeing exported as a string.
Fix for extra initially being exported as a string.
"""
if isinstance(data.get("extra"), str):
data["extra"] = json.loads(data["extra"])
Expand All @@ -170,7 +170,7 @@ class ImportV1MetricSchema(Schema):
@pre_load
def fix_extra(self, data: Dict[str, Any], **kwargs: Any) -> Dict[str, Any]:
"""
Fix for extra initially beeing exported as a string.
Fix for extra initially being exported as a string.
"""
if isinstance(data.get("extra"), str):
data["extra"] = json.loads(data["extra"])
Expand All @@ -192,7 +192,7 @@ class ImportV1DatasetSchema(Schema):
@pre_load
def fix_extra(self, data: Dict[str, Any], **kwargs: Any) -> Dict[str, Any]:
"""
Fix for extra initially beeing exported as a string.
Fix for extra initially being exported as a string.
"""
if isinstance(data.get("extra"), str):
data["extra"] = json.loads(data["extra"])
Expand Down

0 comments on commit 6ce027d

Please sign in to comment.