From 305093e29d03d84423c4964c183b5b1ba15f9c64 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 24 May 2023 13:14:56 +0530 Subject: [PATCH] fix: update meta config as well, which will be `null` Signed-off-by: Pranav C --- .../ncProjectConfigUpgrader.ts | 34 ++++++++----------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/packages/nocodb/src/version-upgrader/ncProjectConfigUpgrader.ts b/packages/nocodb/src/version-upgrader/ncProjectConfigUpgrader.ts index c4c3855018..35a7a759a2 100644 --- a/packages/nocodb/src/version-upgrader/ncProjectConfigUpgrader.ts +++ b/packages/nocodb/src/version-upgrader/ncProjectConfigUpgrader.ts @@ -26,27 +26,23 @@ export default async function ({ ncMeta }: NcUpgraderCtx) { config = JSON.parse( CryptoJS.AES.decrypt(base.config, TEMP_KEY).toString(CryptoJS.enc.Utf8), ); - } catch (e) { - continue; - } - if (!config) { - continue; + // Update the base config with the new secret key + actions.push( + Base.updateBase( + base.id, + { + id: base.id, + projectId: base.project_id, + config, + skipReorder: true, + }, + ncMeta, + ), + ); + } catch (e) { + // ignore the error } - - // Update the base config with the new secret key - actions.push( - Base.updateBase( - base.id, - { - id: base.id, - projectId: base.project_id, - config, - skipReorder: true, - }, - ncMeta, - ), - ); } await Promise.all(actions); }