Browse Source

fix: csv checkbox import

pull/9892/head
DarkPhoenix2704 4 days ago
parent
commit
03f27b4a02
  1. 5
      packages/nc-gui/components/template/Editor.vue

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

@ -461,7 +461,10 @@ async function importTemplate() {
let input = row[col.srcCn]
// parse potential boolean values
if (v.uidt === UITypes.Checkbox) {
input = input ? input.replace(/["']/g, '').toLowerCase().trim() : 'false'
if (typeof input === 'string') {
input = input ? input.replace(/["']/g, '').toLowerCase().trim() : 'false'
}
input = input ?? 'false'
if (input === 'false' || input === 'no' || input === 'n') {
input = '0'
} else if (input === 'true' || input === 'yes' || input === 'y') {

Loading…
Cancel
Save