[ENH] Do not fail on missed cache within server commands (#10634)
Avoid critical failure if cache is missed when interacting with the twenty-orm in the upgrade commands
This commit is contained in:
@ -227,9 +227,11 @@ export class MigrateRichTextContentPatchCommand extends ActiveOrSuspendedWorkspa
|
||||
const schemaName =
|
||||
this.workspaceDataSourceService.getSchemaName(workspaceId);
|
||||
|
||||
const failOnMetadataCacheMiss = false;
|
||||
const workspaceDataSource =
|
||||
await this.twentyORMGlobalManager.getDataSourceForWorkspace(
|
||||
workspaceId,
|
||||
failOnMetadataCacheMiss,
|
||||
);
|
||||
|
||||
const rows = await workspaceDataSource.query(
|
||||
|
||||
@ -76,10 +76,12 @@ export class UpdateDefaultViewRecordOpeningOnWorkflowObjectsCommand extends Acti
|
||||
workflowObjectMetadataIds: string[],
|
||||
workspaceId: string,
|
||||
): Promise<void> {
|
||||
const failOnMetadataCacheMiss = false;
|
||||
const viewRepository =
|
||||
await this.twentyORMGlobalManager.getRepositoryForWorkspace(
|
||||
workspaceId,
|
||||
'view',
|
||||
failOnMetadataCacheMiss,
|
||||
);
|
||||
|
||||
await viewRepository.update(
|
||||
|
||||
Reference in New Issue
Block a user