From ab1e60a97c6d5c688dacbd23bca40cb8f20c4ac3 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 17 Jan 2023 14:50:24 +0530 Subject: [PATCH] fix(gui): skip if related view/hook/column of a filter is not found Signed-off-by: Pranav C --- .../nocodb/src/lib/version-upgrader/ncFilterUpgrader.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/nocodb/src/lib/version-upgrader/ncFilterUpgrader.ts b/packages/nocodb/src/lib/version-upgrader/ncFilterUpgrader.ts index 1515f88b8b..6c250bd04c 100644 --- a/packages/nocodb/src/lib/version-upgrader/ncFilterUpgrader.ts +++ b/packages/nocodb/src/lib/version-upgrader/ncFilterUpgrader.ts @@ -21,7 +21,13 @@ export default async function ({ ncMeta }: NcUpgraderCtx) { } else { continue; } - if (filter.project_id != model.project_id) { + + // skip if related model is not found + if (!model) { + continue; + } + + if (filter.project_id !== model.project_id) { await ncMeta.metaUpdate( null, null,