Browse Source

refactor(nocodb): check filter.fk_column_id & is_group

pull/4969/head
Wing-Kam Wong 2 years ago
parent
commit
ca9adbb090
  1. 5
      packages/nocodb/src/lib/version-upgrader/ncFilterUpgrader_0104004.ts

5
packages/nocodb/src/lib/version-upgrader/ncFilterUpgrader_0104004.ts

@ -236,11 +236,10 @@ async function migrateFilters(ncMeta: NcMetaIO) {
const filters = await ncMeta.metaList2(null, null, MetaTable.FILTER_EXP); const filters = await ncMeta.metaList2(null, null, MetaTable.FILTER_EXP);
let actions = []; let actions = [];
for (const filter of filters) { for (const filter of filters) {
const col = await Column.get({ colId: filter.fk_column_id }, ncMeta); if (!filter.fk_column_id || filter.is_group) {
if (!col || !col.uidt) {
// column not found -> skip
continue; continue;
} }
const col = await Column.get({ colId: filter.fk_column_id }, ncMeta);
if ( if (
[ [
UITypes.SingleLineText, UITypes.SingleLineText,

Loading…
Cancel
Save