mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
fix(import): error with disable_data_preview field (#20932)
This commit is contained in:
parent
dd353ca86a
commit
6ce027d2f8
@ -626,6 +626,7 @@ class ImportV1DatabaseExtraSchema(Schema):
|
|||||||
cost_estimate_enabled = fields.Boolean()
|
cost_estimate_enabled = fields.Boolean()
|
||||||
allows_virtual_table_explore = fields.Boolean(required=False)
|
allows_virtual_table_explore = fields.Boolean(required=False)
|
||||||
cancel_query_on_windows_unload = fields.Boolean(required=False)
|
cancel_query_on_windows_unload = fields.Boolean(required=False)
|
||||||
|
disable_data_preview = fields.Boolean(required=False)
|
||||||
|
|
||||||
|
|
||||||
class ImportV1DatabaseSchema(Schema):
|
class ImportV1DatabaseSchema(Schema):
|
||||||
|
@ -144,7 +144,7 @@ class ImportV1ColumnSchema(Schema):
|
|||||||
@pre_load
|
@pre_load
|
||||||
def fix_extra(self, data: Dict[str, Any], **kwargs: Any) -> Dict[str, Any]:
|
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):
|
if isinstance(data.get("extra"), str):
|
||||||
data["extra"] = json.loads(data["extra"])
|
data["extra"] = json.loads(data["extra"])
|
||||||
@ -170,7 +170,7 @@ class ImportV1MetricSchema(Schema):
|
|||||||
@pre_load
|
@pre_load
|
||||||
def fix_extra(self, data: Dict[str, Any], **kwargs: Any) -> Dict[str, Any]:
|
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):
|
if isinstance(data.get("extra"), str):
|
||||||
data["extra"] = json.loads(data["extra"])
|
data["extra"] = json.loads(data["extra"])
|
||||||
@ -192,7 +192,7 @@ class ImportV1DatasetSchema(Schema):
|
|||||||
@pre_load
|
@pre_load
|
||||||
def fix_extra(self, data: Dict[str, Any], **kwargs: Any) -> Dict[str, Any]:
|
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):
|
if isinstance(data.get("extra"), str):
|
||||||
data["extra"] = json.loads(data["extra"])
|
data["extra"] = json.loads(data["extra"])
|
||||||
|
Loading…
Reference in New Issue
Block a user