Browse Source

refactor(nocodb): move to !isProjectDeleted case

pull/5154/head
Wing-Kam Wong 2 years ago
parent
commit
e944945855
  1. 6
      packages/nocodb/src/lib/version-upgrader/ncAttachmentUpgrader.ts
  2. 6
      packages/nocodb/src/lib/version-upgrader/ncAttachmentUpgrader_0104002.ts

6
packages/nocodb/src/lib/version-upgrader/ncAttachmentUpgrader.ts

@ -175,11 +175,11 @@ export default async function ({ ncMeta }: NcUpgraderCtx) {
} }
await Promise.all(updateRecords); await Promise.all(updateRecords);
} catch (e) { } catch (e) {
// throw the custom timeout error message if applicable
throwTimeoutError(e, timeoutErrorInfo);
// ignore the error related to deleted project // ignore the error related to deleted project
if (!isProjectDeleted) { if (!isProjectDeleted) {
// throw the custom timeout error message if applicable
throwTimeoutError(e, timeoutErrorInfo);
// throw general error
throw e; throw e;
} }
} }

6
packages/nocodb/src/lib/version-upgrader/ncAttachmentUpgrader_0104002.ts

@ -156,11 +156,11 @@ export default async function ({ ncMeta }: NcUpgraderCtx) {
} }
await Promise.all(updateRecords); await Promise.all(updateRecords);
} catch (e) { } catch (e) {
// throw the custom timeout error message if applicable
throwTimeoutError(e, timeoutErrorInfo);
// ignore the error related to deleted project // ignore the error related to deleted project
if (!isProjectDeleted) { if (!isProjectDeleted) {
// throw the custom timeout error message if applicable
throwTimeoutError(e, timeoutErrorInfo);
// throw general error
throw e; throw e;
} }
} }

Loading…
Cancel
Save