Browse Source

fix: key naming for table name

pull/1931/head
Wing-Kam Wong 3 years ago
parent
commit
6873bcb0e6
  1. 2
      packages/nc-gui/components/import/templateParsers/ExcelTemplateAdapter.js
  2. 2
      packages/nc-gui/components/templates/createProjectFromTemplateBtn.vue

2
packages/nc-gui/components/import/templateParsers/ExcelTemplateAdapter.js

@ -42,7 +42,7 @@ export default class ExcelTemplateAdapter extends TemplateGenerator {
}
tableNamePrefixRef[tn] = 0
const table = { tn, refTn: tn, columns: [] }
const table = { table_name: tn, ref_table_name: tn, columns: [] }
this.data[tn] = []
const ws = this.wb.Sheets[sheet]
const range = XLSX.utils.decode_range(ws['!ref'])

2
packages/nc-gui/components/templates/createProjectFromTemplateBtn.vue

@ -173,7 +173,7 @@ export default {
await Promise.all(this.templateData.tables.map(v => (async(tableMeta) => {
const table = tableMeta.table_name
const data = this.importData[tableMeta.refTn]
const data = this.importData[tableMeta.ref_table_name]
await this.$store.dispatch('meta/ActLoadMeta', {
tn: `${prefix}${table}`, project_id: projectId

Loading…
Cancel
Save