mirror of https://github.com/apache/superset.git
fix(datasource): saving new calculated columns (#23783)
This commit is contained in:
parent
71106cfd97
commit
742c2cd8fb
|
@ -139,7 +139,7 @@ const DatasourceModal: FunctionComponent<DatasourceModalProps> = ({
|
||||||
),
|
),
|
||||||
columns: currentDatasource?.columns?.map(
|
columns: currentDatasource?.columns?.map(
|
||||||
(column: Record<string, unknown>) => ({
|
(column: Record<string, unknown>) => ({
|
||||||
id: column.id,
|
id: typeof column.id === 'number' ? column.id : undefined,
|
||||||
column_name: column.column_name,
|
column_name: column.column_name,
|
||||||
type: column.type,
|
type: column.type,
|
||||||
advanced_data_type: column.advanced_data_type,
|
advanced_data_type: column.advanced_data_type,
|
||||||
|
|
|
@ -45,7 +45,7 @@ def validate_python_date_format(value: str) -> None:
|
||||||
|
|
||||||
|
|
||||||
class DatasetColumnsPutSchema(Schema):
|
class DatasetColumnsPutSchema(Schema):
|
||||||
id = fields.Integer()
|
id = fields.Integer(required=False)
|
||||||
column_name = fields.String(required=True, validate=Length(1, 255))
|
column_name = fields.String(required=True, validate=Length(1, 255))
|
||||||
type = fields.String(allow_none=True)
|
type = fields.String(allow_none=True)
|
||||||
advanced_data_type = fields.String(allow_none=True, validate=Length(1, 255))
|
advanced_data_type = fields.String(allow_none=True, validate=Length(1, 255))
|
||||||
|
|
Loading…
Reference in New Issue