π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
fix: Cannot read properties of undefined (reading 'pk')
Ramesh Mane86c70b89746b
diff --git a/packages/nc-gui/components/template/Editor.vue b/packages/nc-gui/components/template/Editor.vueindex d39ca89594..664b75857c 100644--- a/packages/nc-gui/components/template/Editor.vue+++ b/packages/nc-gui/components/template/Editor.vue@@ -477,13 +477,18 @@ function fieldsValidation(record: Record<string, any>, tn: string) {return false}- if (srcDestMapping.value[tn].filter((v: Record<string, any>) => v.destCn === record.destCn).length > 1) {+ if ((srcDestMapping.value[tn] || []).filter((v: Record<string, any>) => v.destCn === record.destCn).length > 1) {message.error(t('msg.error.duplicateMappingFound'))return false}const v = columns.value.find((c) => c.title === record.destCn) as Record<string, any>+ if (!v) {+ message.error(`Column '${record.destCn}' not found`)+ return false+ }+for (const tableName of Object.keys(importData)) {// check if the input contains null value for a required columnif (v.pk ? !v.ai && !v.cdf : !v.cdf && v.rqd) {