diff --git a/packages/nocodb/src/helpers/getColumnPropsFromUIDT.ts b/packages/nocodb/src/helpers/getColumnPropsFromUIDT.ts index 26c4fac99b..ee8ad735dd 100644 --- a/packages/nocodb/src/helpers/getColumnPropsFromUIDT.ts +++ b/packages/nocodb/src/helpers/getColumnPropsFromUIDT.ts @@ -27,12 +27,13 @@ export default async function getColumnPropsFromUIDT( newColumn.dtxs = sqlUi.getDefaultScaleForDatatype(newColumn.dt); const selectTypes = [UITypes.MultiSelect, UITypes.SingleSelect]; - if ( - column && - selectTypes.includes(newColumn.uidt) && - selectTypes.includes(column.uidt as UITypes) - ) { - newColumn.dtxp = (column as NormalColumnRequestType).dtxp; + if (column && selectTypes.includes(column.uidt as UITypes)) { + (column as NormalColumnRequestType).dtxp = + typeof (column as NormalColumnRequestType).dtxp === 'string' + ? ((column as NormalColumnRequestType).dtxp as string) + .trim() + .replace(/'\s*,\s*'/g, "','") + : (column as NormalColumnRequestType).dtxp; } newColumn.altered = column.altered || 2;