Browse Source

refactor(nc-gui): update column_name only NC_SANITIZE_COLUMN_NAME is not false

pull/7022/head
աɨռɢӄաօռɢ 1 year ago
parent
commit
50bb905380
  1. 2
      packages/nc-gui/components/template/Editor.vue

2
packages/nc-gui/components/template/Editor.vue

@ -536,11 +536,13 @@ async function importTemplate() {
columns: table.columns || [], columns: table.columns || [],
}) })
if (process.env.NC_SANITIZE_COLUMN_NAME !== 'false') {
// column_name could have been updated in tableCreate // column_name could have been updated in tableCreate
// e.g. sanitize column name to something like field_1, field_2, and etc // e.g. sanitize column name to something like field_1, field_2, and etc
createdTable.columns.forEach((column, i) => { createdTable.columns.forEach((column, i) => {
table.columns[i].column_name = column.column_name table.columns[i].column_name = column.column_name
}) })
}
table.id = createdTable.id table.id = createdTable.id
table.title = createdTable.title table.title = createdTable.title

Loading…
Cancel
Save