diff --git a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/helpers/getAst.ts b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/helpers/getAst.ts index 6aac66c2f3..da3336a0f3 100644 --- a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/helpers/getAst.ts +++ b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/helpers/getAst.ts @@ -26,6 +26,10 @@ const getAst = async ({ view?: View; dependencyFields?: DependantFields; }) => { + // set default values of dependencyFields and nested + dependencyFields.nested = dependencyFields.nested || {}; + dependencyFields.fieldsSet = dependencyFields.fieldsSet || new Set(); + if (!model.columns?.length) await model.getColumns(); // extract only pk and pv