Browse Source

fix: update meta config as well, which will be `null`

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5718/head
Pranav C 1 year ago
parent
commit
305093e29d
  1. 34
      packages/nocodb/src/version-upgrader/ncProjectConfigUpgrader.ts

34
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);
}

Loading…
Cancel
Save